dijit.ColorPalette needs better support for transparent
|Reported by:||rmaccracken||Owned by:|
|Keywords:||ColorPalette transparent||Cc:||maccrack@…, nic, elazutkin|
I have written an SVG editor and need "transparent" as one of my colors in the palette and would like its value to be "none" rather than a hex value of #ffffff or #000000.
There are a few problems in trying to implement this:
1) Even though the dijit._PaletteMixin provides a "dyeClass" member to override the dyeClass, dijit.ColorPalette provides its own so that there is not a simple way to override it.
2) dojo.Color.named.transparent is set to [255,255,255] (or dojo.config.transparentColor) in dojo/_base/Color.js, but is then overridden by dojo/colors.js and changed to [0,0,0,0]. I'm not sure why this happens, but seems a bit strange. In any case, the toHex function does not distinguish transparent from black/white. I think it makes sense to return "none" as a special case for transparent.
3) transparent is not available in the localization for colors