Initializing Pichai UX
Documentation about initializing Pichai UX and common settings for initializing.
Basic initialization
The init function of Pichai takes an Object
as input.
In the below table you can see each option and what they do.
Key | Value | Description |
---|---|---|
|
| This can both be a |
|
| Whether dark mode or light mode should be used. |
|
| Whether the AI should keep checking if the elements colors still work at the position on the current scroll position. |
|
| Updates the favIcon to match the selected theme. |
|
| Sets the position from where Pichai-UX extracts its colors. |
| url | The link to where the user will be navigated when he presses the logo or title in the template header. To disable it you can set it to an empty string. |
Basic usage
After initializing Pichai. You'll notice that newCSS files have been added to the project aswell as the below CSS variables.
CSS variables
Pichai-UX uses the 3 most dominant colors in the image and assigns a CSS variable to them.
Name | Description |
---|---|
| The primary color. |
| The primary text color. |
| The primary container color. |
| The primary container text color. |
| The secondairy color. |
| The secondairy text color. |
| The secondairy container color. |
| The secondairy container text color. |
| The tertiary color. |
| The tertiary text color. |
| The tertiary container color. |
| The tertiary container text color. |
Functions
Function | input | Output | Description |
---|---|---|---|
| HTML Element | Make any unreadable text color readable. | |
| Image | Base64 | Generates an new version of an icon completely themed to fit together with the theme. |
| Object | Returns a JS object with all the custom elements,their attributes and attribute input types defined by Pichai-UX. |
Last updated