@expressive-code/core
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -556,3 +556,3 @@ import * as hast from 'hast'; | ||
*/ | ||
declare function setLuminance(input: ColorValue, luminance: number): string; | ||
declare function setLuminance(input: ColorValue, targetLuminance: number): string; | ||
/** | ||
@@ -579,2 +579,12 @@ * Lightens a color by the given amount. | ||
declare function getColorContrastOnBackground(input: ColorValue, background: ColorValue): number; | ||
/** | ||
* Modifies the luminance and/or the alpha value of a color to ensure its color contrast | ||
* on the given background color is within the given range. | ||
* | ||
* - If the contrast is too low, the luminance is either increased or decreased first, | ||
* and then the alpha value is increased (if required). | ||
* - If the contrast is too high, only the alpha value is decreased. | ||
* | ||
* If the target contrast cannot be reached, the function will try to get as close as possible. | ||
*/ | ||
declare function ensureColorContrastOnBackground(input: ColorValue, background: ColorValue, minContrast?: number, maxContrast?: number): string; | ||
@@ -581,0 +591,0 @@ declare function changeLuminanceToReachColorContrast(input1: ColorValue, input2: ColorValue, minContrast?: number): string; |
{ | ||
"name": "@expressive-code/core", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A text marking & annotation engine for presenting source code on the web.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
724473
8037