diff options
| author | neauoire <aliceffekt@gmail.com> | 2019-11-09 12:26:15 -0500 |
|---|---|---|
| committer | neauoire <aliceffekt@gmail.com> | 2019-11-09 12:26:15 -0500 |
| commit | 5e1aefd578e19460cc8ce892a27ea974860dd331 (patch) | |
| tree | cd0dbd2e76ae102c8df67e4f55aab1aefbcd0bf2 | |
| parent | af46a15c7f126f776fb28910c0d8ed36459c3852 (diff) | |
| parent | a3581cefdde093efb101fcf0c63aad127f65757b (diff) | |
Merge branch 'master' of https://github.com/hundredrabbits/Themes
| -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. |
