Skip to content

Commit 49318a5

Browse files
authored
Documentation updates (#252)
Resolves #234
1 parent 6dd1d78 commit 49318a5

File tree

8 files changed

+164
-121
lines changed

8 files changed

+164
-121
lines changed

docs/src/markdown/about/contributing.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ST4 | Fully supports the early development releases.
99

1010
Contribution from the community is encouraged and can be done in a variety of ways:
1111

12-
- Become a sponsor.
13-
- Bug reports.
14-
- Reviewing code.
15-
- Code patches via pull requests.
16-
- Documentation improvements via pull requests.
12+
- Become a sponsor.
13+
- Bug reports.
14+
- Reviewing code.
15+
- Code patches via pull requests.
16+
- Documentation improvements via pull requests.
1717

1818
## Become a Sponsor :octicons-heart-fill-16:{: .heart-throb}
1919

@@ -25,26 +25,26 @@ any tier you feel comfortable with. No amount is too little. We also accept one
2525

2626
## Bug Reports
2727

28-
1. Please **read the documentation** and **search the issue tracker** to try to find the answer to your question
29-
**before** posting an issue.
28+
1. Please **read the documentation** and **search the issue tracker** to try to find the answer to your question
29+
**before** posting an issue.
3030

31-
2. When an issue is created, a [template][template] will be shown, please fill out the appropriate sections. If the
32-
template is not followed, the issue will be marked `Invalid` and closed.
31+
2. When an issue is created, a [template][template] will be shown, please fill out the appropriate sections. If the
32+
template is not followed, the issue will be marked `Invalid` and closed.
3333

34-
3. When creating an issue on the repository, please provide as much info as possible:
34+
3. When creating an issue on the repository, please provide as much info as possible:
3535

36-
- Provide environment information by running `Preferences->Package Settings->ColorHelper->Support Info`. The
37-
information will be copied to the clipboard; paste the info in issue.
38-
- Errors in console.
39-
- Detailed description of the problem.
40-
- Examples for reproducing the error. You can post pictures, but if specific text or code is required to reproduce
41-
the issue, please provide the text in a plain text format for easy copy/paste.
42-
- Provide links to 3rd party syntax highlighting package you are using if applicable.
36+
- Provide environment information by running `Preferences->Package Settings->ColorHelper->Support Info`. The
37+
information will be copied to the clipboard; paste the info in issue.
38+
- Errors in console.
39+
- Detailed description of the problem.
40+
- Examples for reproducing the error. You can post pictures, but if specific text or code is required to
41+
reproduce the issue, please provide the text in a plain text format for easy copy/paste.
42+
- Provide links to 3rd party syntax highlighting package you are using if applicable.
4343

4444
The more info provided, the greater the chance someone will take the time to answer, implement, or fix the issue.
4545

46-
4. Be prepared to answer questions and provide additional information if required. Issues in which the creator refuses
47-
to respond to follow up questions will be marked as stale and closed.
46+
4. Be prepared to answer questions and provide additional information if required. Issues in which the creator refuses
47+
to respond to follow up questions will be marked as stale and closed.
4848

4949
## Reviewing Code
5050

@@ -56,17 +56,17 @@ solutions to overcome weakness in the algorithm.
5656
Pull requests are welcome, and if you plan on contributing directly to the code, there are a couple of things to be
5757
mindful of.
5858

59-
1. Please describe the change in as much detail as possible so I can understand what is being added or modified.
59+
1. Please describe the change in as much detail as possible so I can understand what is being added or modified.
6060

61-
2. If you are solving a bug that does not already have an issue, please describe the bug in detail and provide info on
62-
how to reproduce if applicable (this is good for me and others to reference later when verifying the issue has been
63-
resolved).
61+
2. If you are solving a bug that does not already have an issue, please describe the bug in detail and provide info on
62+
how to reproduce if applicable (this is good for me and others to reference later when verifying the issue has been
63+
resolved).
6464

65-
3. Please reference and link related open bugs or feature requests in this pull if applicable.
65+
3. Please reference and link related open bugs or feature requests in this pull if applicable.
6666

67-
4. Make sure you've documented or updated the existing documentation if introducing a new feature or modifying the
68-
behavior of an existing feature that a user needs to be aware of. I will not accept new features or changes to
69-
existing features if you have not provided documentation describing the feature.
67+
4. Make sure you've documented or updated the existing documentation if introducing a new feature or modifying the
68+
behavior of an existing feature that a user needs to be aware of. I will not accept new features or changes to
69+
existing features if you have not provided documentation describing the feature.
7070

7171
Continuous integration tests on are run on all pull requests and commits via Travis CI. When making a pull request, the
7272
tests will automatically be run, and the request must pass to be accepted. You can (and should) run these tests before
@@ -75,20 +75,21 @@ it is strongly suggested that requesters make an effort to verify before request
7575

7676
### Running Validation Tests
7777

78-
!!! tip "Tip"
79-
If you are running Sublime on a Mac OS or Linux/Unix system, you run all tests by by running the shell script
80-
(assuming you have installed your environment fulfills all requirements below):
78+
/// tip | Tip
79+
If you are running Sublime on a Mac OS or Linux/Unix system, you run all tests by by running the shell script
80+
(assuming you have installed your environment fulfills all requirements below):
8181

82-
```
83-
chmod +x run_tests.sh
84-
./run_tests.sh
85-
```
82+
```
83+
chmod +x run_tests.sh
84+
./run_tests.sh
85+
```
86+
///
8687

8788
There are a couple of dependencies that must be present before running the tests.
8889

89-
1. As ST3 is the only current, actively supported version, Python 3.3 must be used to validate the tests.
90+
1. As ST3 is the only current, actively supported version, Python 3.3 must be used to validate the tests.
9091

91-
2. Unit tests are run with `pytest`. You can install `pytest` via:
92+
2. Unit tests are run with `pytest`. You can install `pytest` via:
9293

9394
```
9495
pip install pytest
@@ -100,8 +101,8 @@ There are a couple of dependencies that must be present before running the tests
100101
py.test .
101102
```
102103
103-
3. Linting is performed on the entire project with `flake8`, `flake8-docstrings`, and `pep8-naming`. These can be
104-
installed via:
104+
3. Linting is performed on the entire project with `flake8`, `flake8-docstrings`, and `pep8-naming`. These can be
105+
installed via:
105106
106107
```
107108
pip install flake8

docs/src/markdown/faq.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Often, the duplicate colors may have a slightly different style, and when you cl
99
ColorHelper dialog.
1010

1111
### LSP
12+
1213
Two such examples are [`LSP-css`](https://packagecontrol.io/packages/LSP-css) and
1314
[`LSP-json`](https://packagecontrol.io/packages/LSP-json).
1415

docs/src/markdown/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ in color palettes. It even provides tools for calculating color contrast, inter
1010

1111
## Features
1212

13-
- Inline color previews.
14-
- Useful tooltip popups that show the previews of selected colors.
15-
- Support colors in CSS, SCSS, SASS, HTML attributes, and more.
16-
- Allow saving, accessing, and managing colors in named color palettes all from the tooltip.
17-
- Select and insert colors from the color palettes via the tooltip.
18-
- Convert between color spaces. Supports `rgb`, `hsl`, `hwb`, `lch`, `lab`, and more!
19-
- Color picker, color interpolating, and color contrast tool.
13+
- Inline color previews.
14+
- Useful tooltip popups that show the previews of selected colors.
15+
- Support colors in CSS, SCSS, SASS, HTML attributes, and more.
16+
- Allow saving, accessing, and managing colors in named color palettes all from the tooltip.
17+
- Select and insert colors from the color palettes via the tooltip.
18+
- Convert between color spaces. Supports `rgb`, `hsl`, `hwb`, `lch`, `lab`, and more!
19+
- Color picker, color interpolating, and color contrast tool.
2020

2121
--8<-- "refs.md"

docs/src/markdown/installation.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,46 @@ install the correct branch on your system and keep it up to date.
77

88
---
99

10-
1. Ensure Package Control is installed. Instructions are found [here](https://packagecontrol.io/installation).
10+
1. Ensure Package Control is installed. Instructions are found [here](https://packagecontrol.io/installation).
1111

12-
2. In Sublime Text, press <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>p</kbd> (Win, Linux) or <kbd>cmd</kbd> +
13-
<kbd>shift</kbd> + <kbd>p</kbd> (Mac OS) to bring up the quick panel and start typing
14-
`Package Control: Install Package`. Select the command and it will show a list of installable plugins.
12+
2. In Sublime Text, press <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>p</kbd> (Win, Linux) or <kbd>cmd</kbd> +
13+
<kbd>shift</kbd> + <kbd>p</kbd> (Mac OS) to bring up the quick panel and start typing
14+
`Package Control: Install Package`. Select the command and it will show a list of installable plugins.
1515

16-
3. Start typing `ColorHelper`; when you see it, select it.
16+
3. Start typing `ColorHelper`; when you see it, select it.
1717

18-
4. Restart to be sure everything is loaded proper.
18+
4. Restart to be sure everything is loaded proper.
1919

20-
5. Enjoy!
20+
5. Enjoy!
2121

2222
## Manual Installation
2323

24-
!!! warning "Warning"
25-
This is not the recommended way to install ColorHelper for the average user. Installing this way **will not** get
26-
automatically updated.
24+
/// warning | Warning
25+
This is not the recommended way to install ColorHelper for the average user. Installing this way **will not** get
26+
automatically updated.
2727

28-
If you are forking for a pull request, you should **just** clone ColorHelper and run Package Control's
29-
`Satisfy Dependency` command to get all the dependencies.
28+
If you are forking for a pull request, you should **just** clone ColorHelper and run Package Control's
29+
`Satisfy Dependency` command to get all the dependencies.
30+
///
3031

3132
For those who want to install ColorHelper without package control, here are the steps. It understood that some people
3233
for what ever reason will prefer manually and may even have legitimate reasons to do so. When going this route, you
3334
will have to keep all the packages updated yourself.
3435

3536
---
3637

37-
1. Download the latest releases of the following dependencies and unpack or git clone in the `Packages` folder as shown
38-
below:
38+
1. Download the latest releases of the following dependencies and unpack or git clone in the `Packages` folder as shown
39+
below:
3940

40-
- https://github.com/facelessuser/sublime-markdown-popups -> `mdpopups`
41-
- https://github.com/packagecontrol/typing/issues -> `typing`
41+
- https://github.com/facelessuser/sublime-markdown-popups -> `mdpopups`
42+
- https://github.com/packagecontrol/typing/issues -> `typing`
4243

43-
2. Download and unpack or git clone the latest ColorHelper release and unpack as `ColorHelper`:
44+
2. Download and unpack or git clone the latest ColorHelper release and unpack as `ColorHelper`:
4445

45-
- https://github.com/facelessuser/ColorHelper -> ColorHelper
46+
- https://github.com/facelessuser/ColorHelper -> ColorHelper
4647

47-
3. Create a folder under `Packages` called `00-dependencies` and under that folder create a file called
48-
`00-dependencies.py`:
48+
3. Create a folder under `Packages` called `00-dependencies` and under that folder create a file called
49+
`00-dependencies.py`:
4950

5051
Copy the following code to `00-dependencies.py` (this code was taken from Package Control):
5152

@@ -201,20 +202,20 @@ will have to keep all the packages updated yourself.
201202
add_dependency('typing')
202203
```
203204

204-
4. Restart and enjoy.
205+
4. Restart and enjoy.
205206

206207
## Git Cloning
207208

208-
1. Quit Sublime Text.
209+
1. Quit Sublime Text.
209210

210-
2. Open a terminal and enter the following. For dependencies replace the URL with the appropriate URL, and the
211-
appropriate folder to check it out to:
211+
2. Open a terminal and enter the following. For dependencies replace the URL with the appropriate URL, and the
212+
appropriate folder to check it out to:
212213

213214
```
214215
cd /path/to/Sublime Text 3/Packages
215216
git clone https://github.com/facelessuser/ColorHelper.git ColorHelper
216217
```
217218

218-
3. Restart Sublime Text.
219+
3. Restart Sublime Text.
219220

220221
--8<-- "refs.md"

docs/src/markdown/settings/previews.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ Controls whether previews will attempt to gamut map a color that is out of the p
5555

5656
## `gamut_space`
5757

58-
!!! warning "Experimental Feature"
58+
/// warning | Experimental Feature
59+
///
5960

60-
!!! new "New in 3.8.0"
61+
/// new | New in 3.8.0
62+
///
6163

6264
Select the gamut space used for color previews. You should only pick a space that matches your system. If you happen
6365
to have a display that does not align with one of the spaces below, you may just have to pick whatever is closest.
@@ -78,7 +80,8 @@ for sRGB, then you should not touch the below setting.
7880
7981
## `gamut_map`
8082
81-
!!! new "New in 6.2.0"
83+
/// new | New in 6.2.0
84+
///
8285
8386
Select the gamut mapping approach used when displaying previews or when cohering colors into a specific gamut anywhere
8487
else in the code.

docs/src/markdown/settings/rules.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ A rule will define what kind of colors ColorHelper should look for, and where in
7878
`color_rules` is a list of rule sets, where each rule is a dictionary of options. Only one rule set can apply to a
7979
given view at a time.
8080

81-
!!! tip
82-
New rules and rule overrides should be added to [`user_color_rules`](#user_color_rules) instead of modifying
83-
`color_rules` directly.
81+
/// tip
82+
New rules and rule overrides should be added to [`user_color_rules`](#user_color_rules) instead of modifying
83+
`color_rules` directly.
84+
///
8485

8586
### `name`
8687

@@ -144,9 +145,9 @@ defined in [`color_classes`](#color_classes).
144145
If needed, you can define multiple color classes with a list of dictionaries. Each dictionary in the list should
145146
contain a `class` and `scopes`:
146147

147-
- `scopes`: A string that defines a base scope that the color class applies to.
148+
- `scopes`: A string that defines a base scope that the color class applies to.
148149

149-
- `class`: The name of the color class profile to use (defined in [`color_classes`](#color_classes)).
150+
- `class`: The name of the color class profile to use (defined in [`color_classes`](#color_classes)).
150151

151152
```js
152153
"color_class": [
@@ -283,26 +284,26 @@ The value should be the full import path for the `Color` class.
283284
If none of the provided color classes are sufficient, it is possible to create your own custom class. With that said,
284285
there are a few things to note:
285286

286-
- Custom classes should be derived from the default base class, but there is a catch, ColorHelper handles the default
287-
(`ColorHelper.lib.coloraide.Color`) special. This allows us to enable the users with the ability of defining what
288-
color spaces the default class contains via the [`add_to_default_spaces`](#add_to_default_spaces) setting. In turn,
289-
ensures all color spaces properly function in features like palettes, etc.
287+
- Custom classes should be derived from the default base class, but there is a catch, ColorHelper handles the default
288+
(`ColorHelper.lib.coloraide.Color`) special. This allows us to enable the users with the ability of defining what
289+
color spaces the default class contains via the [`add_to_default_spaces`](#add_to_default_spaces) setting. In turn,
290+
ensures all color spaces properly function in features like palettes, etc.
290291

291292
So, if creating a custom color space, the user should call `ColorHelper.ch_util.get_base_color()` to get the actual
292-
default class to derive from. Users should **not** derive directly from `ColorHelper.lib.coloraide.Color`.
293+
default class to derive from. Users should **not** derive directly from `ColorHelper.lib.coloraide.Color`.
293294

294-
- Colors are passed back and forth between custom color classes and the default color class. As long as both classes
295-
know how to handle the color space, things should work without issue.
295+
- Colors are passed back and forth between custom color classes and the default color class. As long as both classes
296+
know how to handle the color space, things should work without issue.
296297

297298
If a custom color class is using a color space that is not registered under the default class or is using a color
298-
space derived from an unregistered color space, some features won't work.
299+
space derived from an unregistered color space, some features won't work.
299300

300301
In short, it is import to ensure that all color spaces that are actively used in custom color classes are
301-
registered via [`add_to_default_spaces`](#add_to_default_spaces).
302+
registered via [`add_to_default_spaces`](#add_to_default_spaces).
302303

303304
If you are creating a brand new color space, you must also register it, or a version of that color space, with the
304-
default color class. The registered color space must support the `color(id ...)` input and output format as that
305-
format is often used when passing a color around internally within ColorAide.
305+
default color class. The registered color space must support the `color(id ...)` input and output format as that
306+
format is often used when passing a color around internally within ColorAide.
306307

307308
### `filters`
308309

0 commit comments

Comments
 (0)