Page 1 of 1
Predefined color constants with alpha "255"
Posted: Sat Mar 11, 2017 1:32 pm
by Sicro
Since the last release of PB we have now predefined color constants on linux, too.
Now, it would be good we have color constants with alpha channel, too.
Code: Select all
#Blue_Alpha = -65536 ;RGBA(0, 0, 255, 255)
#Black_Alpha = -16777216 ;RGBA(0, 0, 0, 255)
; and so on
Re: Predefined color constants with alpha "255"
Posted: Sat Mar 11, 2017 6:45 pm
by skywalk
+1
Very helpful since the Vector Drawing Lib requires RGBA() colors.
I prefer to prefix my color constants with 'a'.
Code: Select all
;- BLUE
#aBlue = $FFFF0000 ; RGBA(0, 0, 255, 255)
#aBlueLightSky = $FFFF0000 ; RGBA(135, 206, 250, 255)
#BlueDark = $800000 ; RGB(0, 0, 128)
#aBlueDark = $FF800000 ; RGBA(0, 0, 128, 255)
;- BROWN
#Brown = $2A2AA5 ; RGB(165, 42, 42)
#aBrown = $FF2A2AA5 ; RGBA(165, 42, 42, 255)
Re: Predefined color constants with alpha "255"
Posted: Sat Mar 11, 2017 9:14 pm
by nco2k
if they would add a simple #Alpha = -16777216 constant, then we could use it like this:
Color.l = #Blue | #Alpha
c ya,
nco2k
Re: Predefined color constants with alpha "255"
Posted: Mon Mar 13, 2017 8:13 am
by Little John
Sicro wrote:Now, it would be good we have color constants with alpha channel, too.
+1
In general, it would be good if PB had
consistent alpha channel support, not only for predefined constants.