Opened 14 years ago
Closed 11 years ago
#3879 closed enhancement (wontfix)
dojo.style should normalize colors
Reported by: | sjmiles | Owned by: | sjmiles |
---|---|---|---|
Priority: | high | Milestone: | future |
Component: | Core | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Colors in FF are returned as rgb(#,#,#) and #hex in IE. It seems natural that dojo.style should attempt to normalize these values.
Perhaps there is a function for this somewhere already?
Change History (9)
comment:1 Changed 14 years ago by
Type: | defect → enhancement |
---|
comment:2 follow-up: 9 Changed 14 years ago by
comment:3 Changed 13 years ago by
Milestone: | 1.0 → 1.1 |
---|
comment:4 Changed 13 years ago by
Milestone: | 1.1 → 1.2 |
---|
comment:5 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 1.2 → 1.2.1 |
comment:6 Changed 12 years ago by
Scott - we try to limit our dot release fixes to bug fixes and usually don't even have a milestone for this defined until after the major release goes out. In particular with an enhancement, we'd probably rather just see it land in 1.3 if it doesn't make 1.2.
comment:7 Changed 12 years ago by
Milestone: | 1.2.1 → 1.3 |
---|
1.2.1 is only for critical bugs that we find in the 1.2 release; nothing should be marked as 1.2.1 until after we release 1.2
comment:8 Changed 12 years ago by
Milestone: | 1.3 → future |
---|
comment:9 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Replying to peller:
You should be able to construct a dojo.Color with the string, then spit it back out using your choice of toHex or toCss. Only problem is that this will lose alpha information, as there's no x-browser way to represent that. If you're always dealing with rgb (no a), then you're ok.
Color.js + dojo/colors.js work with alpha. Taking into account Adam's workaround I am closing this ticket.
You should be able to construct a dojo.Color with the string, then spit it back out using your choice of toHex or toCss. Only problem is that this will lose alpha information, as there's no x-browser way to represent that. If you're always dealing with rgb (no a), then you're ok.