Skip to content

Commit 8cc150d

Browse files
committed
add DocumenterCodeBlocks
1 parent ebeaea8 commit 8cc150d

7 files changed

Lines changed: 45 additions & 9 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## [v3.32.0] - forthcoming
4+
5+
### Added
6+
7+
- added Paraview Fast colourmap (#156) Thanks @maucejo
8+
9+
- added [ltc colorschemes](github.com/loukesio/ltc-color-palettes/) #158
10+
Thanks @chelate
11+
12+
- add DocumenterCodeBlocks.jl
13+
14+
### Changed
15+
16+
- Restructured the repository to avoid shipping the docs files
17+
(eating bandwidth to DL, and not useful for the end user). #154
18+
19+
### Removed
20+
321
## [v3.31.0] - 2025-09-14
422

523
### Added

‎ColorSchemes/src/ColorSchemes.jl‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,18 +415,27 @@ Create new colorscheme by concatenating two colorschemes.
415415
"""
416416
resample(cs::colorscheme, n=10)
417417
418-
Create a new colorscheme that samples an existing colorscheme `cs` `n` times.
418+
Create a new colorscheme that samples an existing colorscheme `cs` at `n` positions,
419+
including 0 and 1.
419420
420421
```julia
421-
resample(ColorSchemes.turbo)
422-
resample(ColorSchemes.turbo, 5)
422+
resample(ColorSchemes.leonardo, 10)
423+
424+
ColorScheme{Vector{RGB{Float64}}, String, String}(
425+
RGB{Float64}[
426+
RGB(0.05482025926320272, 0.016508952654741622, 0.019315160361063788),
427+
RGB(0.3097689451431823, 0.15249301022575068, 0.06809921145717472),
428+
RGB(0.5217774204862555, 0.4520916788504707, 0.18791801451894713),
429+
RGB(0.9724409077178674, 0.7907008712807734, 0.2851364857083522)],
430+
"general",
431+
"color palette from artist Leonardo Da Vinci's Mona Lisa resampled × 4")
423432
```
424433
"""
425434
function resample(cs::ColorScheme, n=10)
426435
return ColorScheme(
427436
[get(cs, i) for i in range(0, 1, length=max(n, 2))],
428437
cs.category,
429-
cs.notes * " resampled $n")
438+
cs.notes * " resampled × $n")
430439
end
431440

432441
"""

‎ColorSchemes/src/precompile.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PrecompileTools
33
PrecompileTools.@compile_workload begin
44
get(ColorSchemes.leonardo, 0.5)
55
get(ColorSchemes.leonardo, [0.0 1.0; -1.0 2.0])
6-
loadcolorscheme(:flag_blank, [
6+
ColorSchemes.loadcolorscheme(:flag_blank, [
77
RGB(1.1, 1.1, 1.1),
88
RGB(1.1, 1.1, 1.1),
99
RGB(1.1, 1.1, 1.1),

‎docs/Project.toml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
44
ColorVectorSpace = "c3611d14-8923-5661-9e6a-0046d554d3a4"
55
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
66
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
7+
DocumenterCodeBlocks = "b6400b83-267f-4b55-9fd8-bffc853bdfd8"
78
FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
9+
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
810
Luxor = "ae8d54c2-7ccd-5906-9d76-62fc9837b5bc"
911

1012
[compat]
11-
Documenter = "1"
13+
Documenter = "1.17"
1214

13-
[sources]
14-
ColorSchemes = {path = "../ColorSchemes"}
15+
[sources.ColorSchemes]
16+
path = "../ColorSchemes"

‎docs/make.jl‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
using Documenter, Luxor, ColorSchemes
1+
using Documenter, Luxor, ColorSchemes, DocumenterCodeBlocks
22

33
makedocs(
44
modules = [ColorSchemes],
55
sitename = "ColorSchemes",
66
warnonly = true,
7+
plugins = [CodeBlocks()],
78
format = Documenter.HTML(
89
inventory_version = pkgversion(ColorSchemes),
910
size_threshold = nothing,

‎docs/src/basics.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,3 +440,4 @@ for (k, v) in matplotlibcmaps
440440
end
441441
end
442442
```
443+

‎docs/src/functionindex.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22

33
```@index
44
```
5+
6+
```@autodocs
7+
Modules = [ColorSchemes]
8+
Order = [:function, :type]
9+
```

0 commit comments

Comments
 (0)