[reportlab-users] RGBA Colors

Kevin D Smith Kevin.Smith at sixquickrun.com
Thu Dec 3 10:01:08 EST 2009


On Dec 3, 2009, at 5:54 AM, Robin Becker wrote:

> As for the colour alpha patch there are two proposals

>

> 1) use default None with that meaning don't touch canvas alpha.

>

> 2) use default 1 with that implying that canvas alpha is defunct since ordinary colours will always override any existing canvas alpha.

>

> In both cases the issue of what a None value on a colour alpha should mean is meaningful. I guess logically it should do what the existing patch already does ie avoid changing any existing value. That being the case I think I prefer proposal 1). A harder version of two could insist that we always have to have an alpha and could change all the defaults to 1 and insist that None is invalid.

> --

> Robin Becker



I'm happy with either one, but I think proposal 1 gives the most flexibility. It allows people to use colors that don't set explicit alphas and keep an alpha around as long as they want. If someone doesn't want that functionality, they can always explicitly set an alpha on all of their colors. Although with more power and flexibility does come a higher possibility of collisions that aren't totally obvious.

Kevin D Smith
Kevin.Smith at sixquickrun.com





More information about the reportlab-users mailing list