mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
Properly translate hex colors from TextMate themes to rgba (divide alpha by 255)
This commit is contained in:
parent
7c9f50209f
commit
4ba5ccb0fa
@ -46,7 +46,7 @@ describe "TextMateTheme", ->
|
||||
expect(rulesets[2]).toEqual
|
||||
selector: '.editor.focused .selection'
|
||||
properties:
|
||||
'background-color': "rgba(221, 240, 255, 51)"
|
||||
'background-color': "rgba(221, 240, 255, .2)"
|
||||
|
||||
it "returns an array of objects representing the theme's scope selectors", ->
|
||||
expect(rulesets[11]).toEqual
|
||||
@ -62,4 +62,4 @@ describe "TextMateTheme", ->
|
||||
selector: ".invalid-illegal"
|
||||
properties:
|
||||
'color': "#F8F8F8"
|
||||
'background-color': 'rgba(86, 45, 86, 191)'
|
||||
'background-color': 'rgba(86, 45, 86, parseInt(textmateColor[7..8], 16))'
|
||||
|
@ -105,4 +105,4 @@ class TextMateTheme
|
||||
g = parseInt(textmateColor[3..4], 16)
|
||||
b = parseInt(textmateColor[5..6], 16)
|
||||
a = parseInt(textmateColor[7..8], 16)
|
||||
"rgba(#{r}, #{g}, #{b}, #{a})"
|
||||
"rgba(#{r}, #{g}, #{b}, #{a / 255.0})"
|
||||
|
Loading…
Reference in New Issue
Block a user