diff --git a/README.md b/README.md index 415dfef..de8bc86 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/lark.js b/lark.js index 599a5dd..cf14ff0 100644 --- a/lark.js +++ b/lark.js @@ -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