-
Notifications
You must be signed in to change notification settings - Fork 8
GUI Textures & Colours
pgjones edited this page Jun 12, 2012
·
1 revision
The two images files ~A.png and ~B.png (where ~ is replaced by the user choice). Defines the image shape via the texture definition. These images should contain the
Each GUI texture is made of 6 colours (a,b,c,d,e,f) and a background, with the shape sum defined by two RGBA bitmap files. The file channels are referred to as:
- Base (red image 1)
- Highlight (green image 1)
- Border (blue image 1)
- Transparency of image (alpha image 1)
- Base Shadow (red image 2)
- Highlight shadow (green image 2)
- Border shadow (blue image 2)
- Transparency of image 2 (alpha image 2)
The total colour of a pixel is then the sum
r,g,b = g + ([1]/255*a + [2]/255*b + [3]/255*c) + ([5]/255*d + [6]/255*e + [7]/255*f)*[8]/255
alpha = [4]/255
Where the number in []
is the bitmap channel.
Each of the six colours will change depending on the state of which there are, base, highlight and active. Hence for a gui colour palette 18 colours need to be defined, plus one background colour g. NB: If a texture should be absent of colour f, for example, channel 7 should equal 0.