Skip to content

Commit

Permalink
Simplify colours configuration
Browse files Browse the repository at this point in the history
Allow colours to be specified as:
- hex (3, 4, 6 or 8 digits)
- CSS style, e.g. rgb(r,g,b) or rgba(r,g,b,a)
- HTML/CSS colour names
- theme colours

Opacity can be used to override alpha for hex and rgb colours.

Complementary colours are used if foregorund is not specified.

Default coloured icons removed.
  • Loading branch information
Gruntfuggly committed Oct 6, 2020
1 parent 1e1edf1 commit 49d656e
Show file tree
Hide file tree
Showing 27 changed files with 501 additions and 224 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ Both `defaultHighlight` and `customHighlight` allow for the following settings:

`background` - used to set the background colour of the highlight in the editor.

*Note: Foreground and background colours can be one of "red", "green", "blue", "yellow", "magenta", "cyan", "grey", "white" or "black". RGB values can also be used (e.g. "#80FF00"). You can also use colours from the current theme, e.g. `peekViewResult.background`.*
*Note: Foreground and background colours can be specified using [HTML/CSS colour names](https://en.wikipedia.org/wiki/Web_colors) (e.g. "Salmon"), RGB hex values (e.g. "#80FF00"), RGB CSS style values (e.g. "rgb(255,128,0)" or colours from the current theme, e.g. `peekViewResult.background`. Hex and RGB values can also have an alpha specified, e.g. "#ff800080" or "rgba(255,128,0,0.5)".*

`opacity` - percentage value used with the background colour. 100% will produce an opaque background which will obscure selection and other decorations. *Note: opacity is ignored when theme colours are used.*
`opacity` - percentage value used with the background colour. 100% will produce an opaque background which will obscure selection and other decorations. *Note: opacity can only be specified when hex or rgb colours are used.*

`fontWeight`, `fontStyle`, `textDecoration` - can be used to style the highlight with standard CSS values.

`borderRadius` - used to set the border radius of the background of the highlight.

`icon` - used to set a different icon in the tree view. Must be a valid octicon (see <https://octicons.github.com>) or codicon (see <https://microsoft.github.io/vscode-codicons/dist/codicon.html>). If using codicons, specify them in the format "$(*icon*)". The icon defaults to a tick if it's not valid. You can also use "todo-tree", or "todo-tree-filled" if you want to use the icon from the activity view.

`iconColour` - used to set the colour of the icon in the tree. If not specified, it will try to use the foreground colour, the background colour and then the older settings, in that order.
`iconColour` - used to set the colour of the icon in the tree. If not specified, it will try to use the foreground colour or the background colour. Colour can be specified as per foreground and background colours, except that theme colours are not available.

`gutterIcon` - set to true to show the icon in the editor gutter.

`rulerColour` - used to set the colour of the marker in the overview ruler. If not specified, it will default to use the foreground colour.
`rulerColour` - used to set the colour of the marker in the overview ruler. If not specified, it will default to use the foreground colour. Colour can be specified as per foreground and background colours.

`rulerLane` - used to set the lane for the marker in the overview ruler. If not specified, it will default to the right hand lane. Use one of "left", "center", "right", or "full". You can also use "none" to disable the ruler markers.

Expand Down
3 changes: 0 additions & 3 deletions resources/icons/dark/todo-black.svg

This file was deleted.

3 changes: 0 additions & 3 deletions resources/icons/dark/todo-blue.svg

This file was deleted.

3 changes: 0 additions & 3 deletions resources/icons/dark/todo-cyan.svg

This file was deleted.

3 changes: 0 additions & 3 deletions resources/icons/dark/todo-green.svg

This file was deleted.

3 changes: 0 additions & 3 deletions resources/icons/dark/todo-grey.svg

This file was deleted.

3 changes: 0 additions & 3 deletions resources/icons/dark/todo-magenta.svg

This file was deleted.

3 changes: 0 additions & 3 deletions resources/icons/dark/todo-red.svg

This file was deleted.

Loading

0 comments on commit 49d656e

Please sign in to comment.