I am trying to find the most efficient way to output multiple color values from a function.
(我试图找到一种最有效的方法来从一个函数输出多个颜色值。)
The function (will eventually) take the base color and output a color scheme using sass functions (think complementary, tertiary, monochromatic, etc...). (该函数(最终将采用基本颜色)并使用sass函数(请考虑互补色,第三色,单色等)输出配色方案。)
Here is my code that produces the error
(这是我的代码产生错误)
background-color: #020633, color:b7bced Isn't a valid CSS value
(background-color:#020633,color:b7bced不是有效的CSS值)
I'm sure that I need to replace the comma with a semicolon, I'm just not sure if I can or if I'm going about this properly.
(我确定我需要用分号替换逗号,但是我不确定是否可以或是否要正确处理。)
$base-color: #0a104e;
@function darkest-color($darkest-base-color-bg) {
//figure the backgound
$darkest-bg-color: scale-color($darkest-base-color-bg, $saturation: 66%, $lightness: -40%, $alpha: 100%);
//figure the text
$darkest-text-color-nocontrast: scale-color($darkest-base-color-bg, $saturation: 66%, $lightness: 40%, $alpha: 100%);
//figure the contrast between the background and the text
$darkest-text-color: color_adjust_contrast_AERT($darkest-text-color-nocontrast, $darkest-base-color-bg);
//add the two colors to a map
$darkest-color: '';
@return $darkest-color (background-color: $darkest-bg-color, color:$darkest-text-color, );
}
.darkest-accent-strip {
content: darkest-color($base-color);
}
ask by blur translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…