Added rgba function. Updated README

This commit is contained in:
Ceda EI 2018-03-09 10:31:55 +05:30
parent 3eb35428d7
commit caf4c54d76
2 changed files with 6 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# Lark
Firefox addon that fixes input boxes on dark themes.
Lark checks for the background and foreground of each input box and calculates the contrast between them. If the contrast is below a certain value, it changes the background to black or white whichever has more contrast with the foreground than the required threshold. If neither white nor black scores more than the threshold with the foreground color, then both the background and foreground are changed to black and white respectively.

View File

@ -39,6 +39,10 @@ function rgb(r, g, b) {
return [r, g, b]
}
function rgba(r, g, b, a) {
return [r, g, b]
}
const blackLum = 0
const black = '#000000';
const whiteLum = 1