Less.js: 색상 κΈ°λŠ₯으둜 λ°˜μ „ 포함

에 λ§Œλ“  2012λ…„ 01μ›” 21일  Β·  6μ½”λ©˜νŠΈ  Β·  좜처: less/less.js

ν˜„μž¬ λ‚΄κ°€ μ‚¬μš©ν•˜κ³  μžˆλŠ”
color: hsl(hue(@black), saturation(@black), 100 - lightness(@black));
색상을 λ°˜μ „ν•˜μ§€λ§Œ
color: invert(@color)
μž‘μ—…μ— 훨씬 더 λ‚˜μ€ ꡬ문이 될 κ²ƒμž…λ‹ˆλ‹€.

κΈ°λŠ₯ μ½”λ“œ:

 λ°˜μ „: ν•¨μˆ˜(색상) {
 var rgb = [255 - color.rgb[0],
 255 - color.rgb[1],
 255 - color.rgb[2]]; 
 λ°˜ν™˜ new(tree.Color)(rgb);
 }, 

λ‚˜λŠ” less.js 1.2.1둜 그것을 ν…ŒμŠ€νŠΈν•˜μ—¬ μž‘λ™ν•©λ‹ˆλ‹€.

feature request medium priority up-for-grabs

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

이것에 λŒ€ν•΄ +1:
λͺ…ν™•νžˆν•˜κΈ° μœ„ν•΄ μ‚¬μš©ν•˜κ³  μžˆλ‹€λŠ” 것을 μ˜λ―Έν•©λ‹ˆκΉŒ?

hsl(hue(@color), saturation(@color), 100 - lightness(@color));

λͺ¨λ“  6 λŒ“κΈ€

μ—…λ°μ΄νŠΈλœ 원본 κ²Œμ‹œλ¬Ό

이것에 λŒ€ν•΄ +1:
λͺ…ν™•νžˆν•˜κΈ° μœ„ν•΄ μ‚¬μš©ν•˜κ³  μžˆλ‹€λŠ” 것을 μ˜λ―Έν•©λ‹ˆκΉŒ?

hsl(hue(@color), saturation(@color), 100 - lightness(@color));

+1도 λ©λ‹ˆλ‹€.

이것은 이제 λΆ€μ •μœΌλ‘œ 달성할 수 μžˆμŠ΅λ‹ˆλ‹€

http://lesscss.org/functions/#color - ν˜Όν•© λΆ€μ •

μ‹€μ œλ‘œλŠ” negation μ•„λ‹™λ‹ˆλ‹€. @Oskariok 이 κ²Œμ‹œν•œ μžλ°”μŠ€ν¬λ¦½νŠΈ μ½”λ“œλŠ” λ‹¨μˆœ Less (#fff - @color) λ˜λŠ” difference(#fff, @color) μž…λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ λ‚˜μ€‘μ— @ascottmccauley κ°€ μ œμ•ˆν•œ Less μ½”λ“œλŠ” λ™μΌν•˜μ§€ μ•Šκ³  색상 밝기만 λ°˜μ „λ©λ‹ˆλ‹€(κ·Έλž˜μ„œ 첫 번째 κ²Œμ‹œλ¬Όμ˜ Less와 javascript μŠ€λ‹ˆνŽ«μ΄ μ„œλ‘œ μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€). "가벼움 λ°˜μ „"도 덜 μž₯ν™©ν•˜κ²Œ 달성할 수 μžˆμŠ΅λ‹ˆλ‹€: spin((#fff - @color), 180);

μ’‹μ•„ μ–΄λŠ μͺ½μ΄λ“ ..

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰