Class: PSD::SheetColor
Overview
This is the color label for a group/layer. Not sure why Adobe refers to it as the “Sheet Color”.
Constant Summary
collapse
- COLORS =
[
:no_color,
:red,
:orange,
:yellow,
:green,
:blue,
:violet,
:gray
]
Instance Attribute Summary
Attributes inherited from LayerInfo
#data
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from LayerInfo
#initialize, #skip
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Class Method Details
.should_parse?(key) ⇒ Boolean
7
8
9
|
# File 'lib/psd/layer/info/sheet_color.rb', line 7
def self.should_parse?(key)
key == 'lclr'
end
|
Instance Method Details
#color ⇒ Object
32
33
34
|
# File 'lib/psd/layer/info/sheet_color.rb', line 32
def color
COLORS[@data[0]]
end
|
#parse ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'lib/psd/layer/info/sheet_color.rb', line 22
def parse
@data = [
@file.read_short,
@file.read_short,
@file.read_short,
@file.read_short
]
end
|