mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Always use settings for parsing
This commit is contained in:
@@ -25,11 +25,6 @@ class Color
|
||||
new Color(parsedColor.red(), parsedColor.green(), parsedColor.blue(), parsedColor.alpha())
|
||||
|
||||
constructor: (red, green, blue, alpha) ->
|
||||
red = parseColor(red)
|
||||
green = parseColor(green)
|
||||
blue = parseColor(blue)
|
||||
alpha = parseColor(alpha)
|
||||
|
||||
Object.defineProperties this,
|
||||
red:
|
||||
set: (newRed) -> red = parseColor(newRed)
|
||||
@@ -52,6 +47,11 @@ class Color
|
||||
enumerable: true
|
||||
configurable: false
|
||||
|
||||
@red = red
|
||||
@green = green
|
||||
@blue = blue
|
||||
@alpha = alpha
|
||||
|
||||
# Esssential: Returns a {String} in the form `'#abcdef'`.
|
||||
toHexString: ->
|
||||
"##{numberToHexString(@red)}#{numberToHexString(@green)}#{numberToHexString(@blue)}"
|
||||
|
||||
Reference in New Issue
Block a user