diff options
| author | Лu Лinveгa <aliceffekt@gmail.com> | 2019-11-09 12:14:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-09 12:14:19 -0500 |
| commit | a3581cefdde093efb101fcf0c63aad127f65757b (patch) | |
| tree | fde52d2297aebe6a312900d0322a9dc5395a90c5 /README.md | |
| parent | f418879589dd02fab9175aba5294931d4b158e3d (diff) | |
Update README.md
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -26,17 +26,21 @@ theme.install(document.body); theme.start(); ``` -***Add a callback** once a new theme has been loaded with: +**Trigger a function** once a new theme has been loaded: ``` -theme.onLoad = obj.method +theme.onLoad = callback ``` -This will add an handler that will detect files dragged onto the project window, and append a `<style>` element to your document's body element with the theme overrides. +The callback will fire when a new theme has loaded, perfect to connect a refresh method and update your application with the new colors. ## Format Specs -The Theme format holds only 9 different colors, including 4 foreground colors, 4 background colors, and a global background color. Each foreground color should be readable on each background color, with the exception of the `inv` types, which are designed to be used in warnings or modals and should only overlap each other. You can test your themes online with the [Theme Benchmark](https://hundredrabbits.github.io/Themes/). +The Theme format holds 9 different colors, including 4 foreground colors, 4 background colors, and a global background color. Each foreground color should be readable on every background color, with the exception of the `inv` types, which are designed to be used in warnings or modals and should only overlap each other. + +A variable's contrast should be seen as an offset to the global background color, so instance, `f_high` represents a high contrast color against the global `background`, and so does `b_high`, representing a highly contrasted color against the global `background`. + +You can test your themes online with the [Theme Benchmark](https://hundredrabbits.github.io/Themes/). - `background`, Application Background. - `f_high`, Foreground, high-contrast. |
