09.03.2005, 06:06:11
(This post was last modified: 09.03.2005, 06:17:37 by Bobingabout.)
like i said, and was with the original plan PD had, create a list, which means its a feature than can only be turned on in a mod...
[NewMenuColors]
1=NeonGreen;Black
2=Red; Nice Brown
just an example.
but the actual original idea was [MenuColors] which would require you to specify all the existing colours on there too. only trouble the other way is that you can't turn off the original 8.
BTW, the original 8 go by position in the colours list, not the name.
also, some kind of way to change the actual colour in the drop down menu... not easy, like i said before since they use 2 different formats.
PD said if WW used the standard HLS instead of their unique HSB it would be a lot easier. But I've written some working formulas for sat and bri, and a big if section containing 6 formulas for hue, he could import that to YR if he really wanted to...
I'l try converting that massive 12 if 6 formula block of code for hue into a formula, well 3 formulas, 1 for each colour(RBG).
but this is how it works, first hue is calculated, resulting in 1 colour being 255, 1 being 0, and the last anywhere from 0 to 255. these are then crunched by Sat first, which increases any number bellow 255 by the percentage represented by sat of the remaining value.
lol, IE, sat is 127(50%), a colour is 155, that leaves 100 remaining, the sat would add 50% of that 100 to 155, IE 155+100*.5=155+50=205.
or a colour of 0 would simply add 127, cos thats half.
Bri would then do the same the other way, IE, lower values higher than 0. IE 255 on the colour and 127 on the bri would result in 127 on the colour, 127 would become 63, and so on.
so if the hue gave RGB 255,127,0 with sat and bri of 127 each, we'd end up with something like 192,127,63, its just the hue thats the hard part. and hard for PD to add unless its a formula instead of a bunch of ifs and a few formulas.
you see, the hue begins with red as 255 where green and blue are 0. first green rises in a stright line until 1/6 of the way through hue, when it hits max, at which point both red and green are 255, and blue is 0. then red drops till 1/3. blue rises till 1/2, green drops till 2/3, red rises till 5/6 and in the last 6th, blue drops again.
I've got a grath of it. top section is hue, middle is sat, and bottomis bri. in the graph for sat and bri i assumed hue was 0, hence red=255, green=0 and blue=0. so a red line represents colour of 255, and cyan a colour of 0. they get calculated in the order HSB, but it doesn't really matter what order the effects of bri and sat are added.
if anyone can think of a formula to get an RGB value out of that map for hue, let me know.
[NewMenuColors]
1=NeonGreen;Black

2=Red; Nice Brown
just an example.
but the actual original idea was [MenuColors] which would require you to specify all the existing colours on there too. only trouble the other way is that you can't turn off the original 8.
BTW, the original 8 go by position in the colours list, not the name.
also, some kind of way to change the actual colour in the drop down menu... not easy, like i said before since they use 2 different formats.
PD said if WW used the standard HLS instead of their unique HSB it would be a lot easier. But I've written some working formulas for sat and bri, and a big if section containing 6 formulas for hue, he could import that to YR if he really wanted to...
I'l try converting that massive 12 if 6 formula block of code for hue into a formula, well 3 formulas, 1 for each colour(RBG).
but this is how it works, first hue is calculated, resulting in 1 colour being 255, 1 being 0, and the last anywhere from 0 to 255. these are then crunched by Sat first, which increases any number bellow 255 by the percentage represented by sat of the remaining value.
lol, IE, sat is 127(50%), a colour is 155, that leaves 100 remaining, the sat would add 50% of that 100 to 155, IE 155+100*.5=155+50=205.
or a colour of 0 would simply add 127, cos thats half.
Bri would then do the same the other way, IE, lower values higher than 0. IE 255 on the colour and 127 on the bri would result in 127 on the colour, 127 would become 63, and so on.
so if the hue gave RGB 255,127,0 with sat and bri of 127 each, we'd end up with something like 192,127,63, its just the hue thats the hard part. and hard for PD to add unless its a formula instead of a bunch of ifs and a few formulas.
you see, the hue begins with red as 255 where green and blue are 0. first green rises in a stright line until 1/6 of the way through hue, when it hits max, at which point both red and green are 255, and blue is 0. then red drops till 1/3. blue rises till 1/2, green drops till 2/3, red rises till 5/6 and in the last 6th, blue drops again.
I've got a grath of it. top section is hue, middle is sat, and bottomis bri. in the graph for sat and bri i assumed hue was 0, hence red=255, green=0 and blue=0. so a red line represents colour of 255, and cyan a colour of 0. they get calculated in the order HSB, but it doesn't really matter what order the effects of bri and sat are added.
if anyone can think of a formula to get an RGB value out of that map for hue, let me know.