Article Details
Id: | 16404 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 3.02.03 |
Opened: | 20/09/2019 |
Closed: | 27/09/2019 |
Released: | 22/11/2019 |
Job: | J022990 |
HTML Widgets; New function to determine whether a colour is light or dark
The following functions are now available on the JavaScript widget object:
- IsColourDark
- IsColourLight
There functions should be passed an HTML Hex colour, e.g.,:
if (widget.IsColourDark("#202020") {
window.alert("dark")
}
NOTE: The algorithm used by these functions is the same one used by finPOWER Connect Cloud and may not perfectly suit your needs.