Skip to content

Commit 499a376

Browse files
committed
replace greyscale ramp table with calculation
1 parent 4cb2e59 commit 499a376

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

autoload/css_color.vim

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -67,32 +67,7 @@ else
6767
\ [ 0x00, 0xFF, 0xFF, 14 ],
6868
\ [ 0xFF, 0xFF, 0xFF, 15 ]]
6969
" grayscale ramp
70-
" (value is 8+10*lum for lum in 0..23)
71-
let s:xtermcolor += [
72-
\ [ 0x08, 0x08, 0x08, 232 ],
73-
\ [ 0x12, 0x12, 0x12, 233 ],
74-
\ [ 0x1C, 0x1C, 0x1C, 234 ],
75-
\ [ 0x26, 0x26, 0x26, 235 ],
76-
\ [ 0x30, 0x30, 0x30, 236 ],
77-
\ [ 0x3A, 0x3A, 0x3A, 237 ],
78-
\ [ 0x44, 0x44, 0x44, 238 ],
79-
\ [ 0x4E, 0x4E, 0x4E, 239 ],
80-
\ [ 0x58, 0x58, 0x58, 240 ],
81-
\ [ 0x62, 0x62, 0x62, 241 ],
82-
\ [ 0x6C, 0x6C, 0x6C, 242 ],
83-
\ [ 0x76, 0x76, 0x76, 243 ],
84-
\ [ 0x80, 0x80, 0x80, 244 ],
85-
\ [ 0x8A, 0x8A, 0x8A, 245 ],
86-
\ [ 0x94, 0x94, 0x94, 246 ],
87-
\ [ 0x9E, 0x9E, 0x9E, 247 ],
88-
\ [ 0xA8, 0xA8, 0xA8, 248 ],
89-
\ [ 0xB2, 0xB2, 0xB2, 249 ],
90-
\ [ 0xBC, 0xBC, 0xBC, 250 ],
91-
\ [ 0xC6, 0xC6, 0xC6, 251 ],
92-
\ [ 0xD0, 0xD0, 0xD0, 252 ],
93-
\ [ 0xDA, 0xDA, 0xDA, 253 ],
94-
\ [ 0xE4, 0xE4, 0xE4, 254 ],
95-
\ [ 0xEE, 0xEE, 0xEE, 255 ]]
70+
let s:xtermcolor += map(range(24),'repeat([10*v:val+8],3) + [v:val+232]')
9671

9772
" the 6 values used in the xterm color cube
9873
" 0 95 135 175 215 255

0 commit comments

Comments
 (0)