Skip to content

Commit

Permalink
add color scheme and some more info about color labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
srobotta committed Dec 12, 2023
1 parent 1859b4f commit e701d5a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,47 @@ The color name can be an arbitrary string e.g. Red or Dark Green or whatever you
your color. The name can be also the "corporate name" e.g. that is used in any style guides
of the corporate identity at your institution.

### Colorscheme

If you want a predefined color scheme, then you may add the json from
the file `colorscheme.json` into the settings `textcolors` and/or `backgroundcolors`
in the plugin settings. This can be done by e.g.

```
UPDATE config_plugins
SET value = '<json_string>'
WHERE plugin = 'tiny_fontcolor' AND name = 'textcolors';
```

### Multilanguage support

Color names may also use language tags for the color names. Text filters
are applied. For example setting black and white with German and English
labels would look like this:

```
[
{
"name": "<span class=\"multilang\" lang=\"de\">Schwarz</span><span class=\"multilang\" lang=\"en\">Black</span>",
"value": "#000000"
},
{
"name": "<span class=\"multilang\" lang=\"de\">Weiss</span><span class=\"multilang\" lang=\"en\">White</span>",
"value": "#ffffff"
}
]
```

The value of the `name` property can be copied as it is, in the admin settings area.

The name of the color is used as a tooltip in the editor when hovering
over the appropriate color square.

## Version History

## Current Master
- Add json for a comprehensive color scheme (thanks to Joseph Rézeau).

### 0.4
- Add CI stack for Moodle 4.3

Expand Down
1 change: 1 addition & 0 deletions colorscheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"Black","value":"#000000"},{"name":"Burnt orange","value":"#993300"},{"name":"Dark olive","value":"#333300"},{"name":"Dark green","value":"#003300"},{"name":"Dark azure","value":"#003366"},{"name":"Navy Blue","value":"#000080"},{"name":"Indigo","value":"#333399"},{"name":"Very dark gray","value":"#333333"},{"name":"Maroon","value":"#800000"},{"name":"Orange","value":"#FF6600"},{"name":"Olive","value":"#808000"},{"name":"Green","value":"#008000"},{"name":"Teal","value":"#008080"},{"name":"Blue","value":"#0000FF"},{"name":"Grayish blue","value":"#666699"},{"name":"Gray","value":"#808080"},{"name":"Red","value":"#FF0000"},{"name":"Amber","value":"#FF9900"},{"name":"Yellow green","value":"#99CC00"},{"name":"Sea green","value":"#339966"},{"name":"Turquoise","value":"#33CCCC"},{"name":"Royal blue","value":"#3366FF"},{"name":"Purple","value":"#800080"},{"name":"Medium gray","value":"#999999"},{"name":"Magenta","value":"#FF00FF"},{"name":"Gold","value":"#FFCC00"},{"name":"Yellow","value":"#FFFF00"},{"name":"Lime","value":"#00FF00"},{"name":"Aqua","value":"#00FFFF"},{"name":"Sky blue","value":"#00CCFF"},{"name":"Red violet","value":"#993366"},{"name":"White","value":"#FFFFFF"},{"name":"Pink","value":"#FF99CC"},{"name":"Peach","value":"#FFCC99"},{"name":"Light yellow","value":"#FFFF99"},{"name":"Pale green","value":"#CCFFCC"},{"name":"Pale cyan","value":"#CCFFFF"},{"name":"Light sky blue","value":"#99CCFF"},{"name":"Plum","value":"#CC99FF"}]

0 comments on commit e701d5a

Please sign in to comment.