-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Header color on dark background (#420)
* Header color on dark background * Luma threshold as dashboard settings * style fix underline
- Loading branch information
Showing
5 changed files
with
106 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { createTheme } from '@material-ui/core/styles'; | ||
export const lightTheme = createTheme({ | ||
palette: { | ||
type: 'light', | ||
}, | ||
}); | ||
|
||
export const darkHeaderTheme = createTheme({ | ||
palette: { | ||
text: { | ||
primary: '#ffffff', | ||
}, | ||
}, | ||
}); | ||
|
||
export const luma = (colorString) => { | ||
let color = colorString.substring(1); // strip # | ||
let rgb = parseInt(color, 16); // convert rrggbb to decimal | ||
let r = (rgb >> 16) & 0xff; // extract red | ||
let g = (rgb >> 8) & 0xff; // extract green | ||
let b = (rgb >> 0) & 0xff; // extract blue | ||
|
||
return 0.2126 * r + 0.7152 * g + 0.0722 * b; // per ITU-R BT.709 | ||
}; | ||
|
||
export default lightTheme; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters