#8 - June 2, 2013, 3:48 a.m.
I believe the following information is correct, but I’m going to have to check with other people to be sure:
The data for each color in the API represents a color shift from a base color to a new color. The base color for many dyes, including all guild emblem dyes, is RGB 128,26,26.
For guild emblems themselves, there are a few color masks such as the one here that can be used to define where the color gets applied on the emblem, and slight variances in the color that gets applied (by varying the base color).
Brightness should be added to or subtracted from each component of the color
Contrast should used as a multiplier for each component of the color ((color – 128) * contrast + 128)
Hue is a value from 0-360 degrees. Saturation and Lightness are both multipliers of the original S & L values.
The order of operations is:
1) Take the base (RGB) color
2) Apply brightness and contrast
3) Convert color to HSL space
4) Apply HSL shift
5) Convert color back to RGB space (this is the final color value)
http://dragonwatch.net/fancyemblemexperiment/ does most of this math already, using pixastic. The only thing it’s missing is brightness/contrast, which seem to be something that pixastic also supports.
I’ll make another update tomorrow to the API to make the values in the API match the values in this post.