AuthorTopic: Filling a 16x16 tile randomly with 5 colors  (Read 1463 times)

Offline Cherno

  • 0010
  • *
  • Posts: 120
  • Karma: +0/-0
    • View Profile

Filling a 16x16 tile randomly with 5 colors

on: February 28, 2016, 06:15:11 pm
As the title says. I'd like to create a floor tile where the pixels are randomly filled with one of 5 different colors (gradient). I use Photoshop and have experimented with the Noise filter, but the I never manage to limit the result to 5 (or any arbitary number) of colors.

Offline sonicspin

  • 0001
  • *
  • Posts: 71
  • Karma: +0/-0
  • no
    • View Profile

Re: Filling a 16x16 tile randomly with 5 colors

Reply #1 on: February 28, 2016, 07:56:28 pm
posterize layers would help you with that, i believe

Offline Cherno

  • 0010
  • *
  • Posts: 120
  • Karma: +0/-0
    • View Profile

Re: Filling a 16x16 tile randomly with 5 colors

Reply #2 on: February 28, 2016, 08:42:11 pm
I thought so too, but the posterize image option acts weird; The levels that can be set result in far fewer actual levels in the image.

Offline eishiya

  • 0100
  • ***
  • Posts: 1263
  • Karma: +2/-0
    • http://pixeljoint.com/p/28889.htm
    • View Profile
    • Webcomic: Black Dram

Re: Filling a 16x16 tile randomly with 5 colors

Reply #3 on: February 28, 2016, 09:41:21 pm
Generate your noise in RGB mode, then set your image to Indexed mode with the palette size limited to whatever number of colours you want. That will reduce the colour count to that number. Then, you can customise the colours by changing the palette, or by going back to RGB mode and filling in the pixels with arbitrary colours with the Paint Bucket with 0 tolerance and Contiguous turned off.