T O P I C R E V I E W |
yogiyang |
Posted - Sep 15 2017 : 02:32:41 Hello,
I have a need where in I have to show swatches of colors from which user will select a color which is then used as background color.
I have to generate randomly 100 color swatches and these colors should always be light so that text on them is clearly visible. For example Light Blue, Light Brown, Light Pink, etc. shades.
Any ideas as to how we can generate 100 random Light colors and show them as swatches in ImageEn?
TIA
Yogi Yang |
2 L A T E S T R E P L I E S (Newest First) |
yogiyang |
Posted - Sep 16 2017 : 02:23:17 Thanks Nigel,
Now you have got me started!
Here is what I am going to do: Generate random values between 200 and 255 for each channel (RGB) and build a set of random light colors.
TIA
Yogi Yang |
xequte |
Posted - Sep 15 2017 : 16:25:56 Hi Yogi
Light colors are ones where all the R,G and B values are high, e.g. > 200. So you could write some method to generate a list of colors with high RGB values and then display them in the TIEColorPalette:
Nigel Xequte Software www.xequte.com nigel@xequte.com |
|
|