Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new palettes, updated docs, and clarified config language. #59

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8000750
Added Java 17 runtime information for project Gradle 7.3 to build and…
bv-torrent Jun 24, 2023
64e23dc
Added new themes "Spectrum" and "Nightfall" to the plugin settings UI…
bv-torrent Jun 24, 2023
fc59ea1
Increased version to 2.2.0 to reflect new themes added. Temporarily c…
bv-torrent Jun 26, 2023
cf23d71
Revert "Increased version to 2.2.0 to reflect new themes added. Tempo…
bv-torrent Jun 26, 2023
4c468d5
Revert "Added new themes "Spectrum" and "Nightfall" to the plugin set…
bv-torrent Jun 26, 2023
eb93fef
Added new themes "Spectrum" and "Nightfall". Changed slider language …
bv-torrent Jun 26, 2023
23c05cc
Minor version bump 2.1.0 -> 2.2.0. Also added macOS .DS_Store to .git…
bv-torrent Jun 26, 2023
5cd6cea
Colors for new themes "Spectrum" & "Nightfall" defined. Logic for sel…
bv-torrent Jun 26, 2023
7bf1996
Updated CHANGELOG.md with 2.2.0 changes.
bv-torrent Jun 26, 2023
d2cb808
Merge pull request #1 from bv-torrent/dev
bv-torrent Jun 26, 2023
553b38d
Fixed text for # of colors in Spectrum theme, 10->13.
bv-torrent Jun 26, 2023
ad105c1
Merge remote-tracking branch 'origin/master'
bv-torrent Jun 26, 2023
adedb4b
Corrected requirements for Dev environments in README.md
bv-torrent Jun 26, 2023
0e30ea1
Corrected requirements for Dev environments in README.md
bv-torrent Jun 27, 2023
abc3da1
Merge pull request #2 from dima74/master
bv-torrent Jun 30, 2023
1be629d
Merge branch 'dima74:master' into dev
bv-torrent Jun 30, 2023
e9a6aa6
Added new color palettes: Aquaflow, Luminarium, Monochrome, Prism, So…
bv-torrent Jul 2, 2023
45a7b82
Merge remote-tracking branch 'origin/dev' into dev
bv-torrent Jul 2, 2023
7568a53
Merge pull request #3 from bv-torrent/dev
bv-torrent Jul 2, 2023
1aea45b
Adjusted number of colors for new palettes. Renamed 'Prism' palette t…
bv-torrent Jul 5, 2023
5fc6dad
Adjusted palettes # of colors again to avoid issues with customPalett…
bv-torrent Jul 6, 2023
239bc62
Adjusted palettes # of colors again to avoid issues with customPalett…
bv-torrent Jul 6, 2023
4de406c
Merge pull request #4 from bv-torrent/dev
bv-torrent Jul 6, 2023
ae6e1d7
Added video showcasing new palettes for README.MD
bv-torrent Jul 6, 2023
0fbe070
Updated settings image with new palettes .
bv-torrent Jul 6, 2023
f336166
Update README.md with new palettes
bv-torrent Jul 6, 2023
fb1d42f
Merge pull request #5 from bv-torrent/master
bv-torrent Jul 6, 2023
eaa3e9a
Merge pull request #6 from bv-torrent/dev
bv-torrent Jul 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.idea
.qodana
build
src/.DS_Store
.DS_Store
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.0
- Added new color palettes: Spectrum, Rainbow Spectrum, Nightfall, Aquaflow, Luminarium, Monochrome, and Solarized.
- Enhanced user experience by improving the language of the opacity slider. Renamed "Less Opacity"/"More Opacity" to "Transparent"/"Opaque".

## 2.1.0
- Add option to make edges round
- Fix language detection for "Never highlight indent as error" option
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This extension colorizes the indentation in front of your text alternating six d

Get it here: [JetBrains Plugins Repository](https://plugins.jetbrains.com/plugin/13308-indent-rainbow)

![Example](https://raw.githubusercontent.com/dima74/intellij-indent-rainbow/master/assets/example_16_10.png)
https://github.com/bv-torrent/intellij-indent-rainbow/assets/5946246/493486dd-70c9-4275-a90e-ed473c3136b1

## Change colors
There are two options to change indent colors in `Settings | Indent Rainbow`:
Expand All @@ -20,7 +20,7 @@ There are two options to change indent colors in `Settings | Indent Rainbow`:

2. You can configure each color (the error color and six indent colors) by specifying custom color palette

![Settings page](https://raw.githubusercontent.com/dima74/intellij-indent-rainbow/master/assets/settings.png)
![settings](https://github.com/bv-torrent/intellij-indent-rainbow/assets/5946246/801a8ab4-5a2b-4525-b4d6-114845397953)

## Feedback
Please welcome to submit issues and feature requests!
Expand Down
Binary file added assets/palettes.mp4
Binary file not shown.
Binary file modified assets/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pluginGroup = indent-rainbow
pluginName = Indent Rainbow
pluginVersion = 2.1.0
pluginVersion = 2.2.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
Expand Down
84 changes: 84 additions & 0 deletions src/main/kotlin/indent/rainbow/IrColors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,83 @@ class IrBuiltinColorsPalette(errorColor: Int, indentColors: Array<Int>) : IrColo
// https://github.com/oderwat/vscode-indent-rainbow/pull/64
arrayOf(0x26C7CEEA, 0x26B5EAD7, 0x26E2F0CB, 0x26FFDAC1, 0x26FFB7B2, 0x26FF9AA2)
)
val SPECTRUM = IrBuiltinColorsPalette(
DEFAULT_ERROR_COLOR,
arrayOf(
0x121E90FF, // Dodger Blue
0x128A2BE2, // Dark Violet
0x12FF0000, // Red
0x12FF8C00, // Dark Orange
0x12FFD700, // Gold
0x1232CD32 // Green
)
)
val RAINBOW_SPECTRUM = IrBuiltinColorsPalette(
DEFAULT_ERROR_COLOR,
arrayOf(
0x12FF0000, // Red
0x12FF8C00, // Dark Orange
0x12FFD700, // Gold
0x1232CD32, // Green
0x121E90FF, // Dodger Blue
0x128A2BE2 // Dark Violet
)
)
val NIGHTFALL = IrBuiltinColorsPalette(
DEFAULT_ERROR_COLOR,
arrayOf(
0x120052A2, // Navy
0x1254589F, // Medium Purple
0x12D47796, // Dusty Dark Rose
0x12FFA3A1, // Salmon
0x12FFEABD, // Peach
0x12FFC07A // Goldenrod
)
)
val AQUAFLOW = IrBuiltinColorsPalette(
DEFAULT_ERROR_COLOR,
arrayOf(
0x1222237D, // Dark Blue
0x122A3A88, // Prussian Blue
0x12355A97, // Medium Blue
0x12417CA7, // Cerulean
0x124C9CB6, // Light Blue
0x1281C8d8 // Sky Blue
)
)
val LUMINARIUM = IrBuiltinColorsPalette(
DEFAULT_ERROR_COLOR,
arrayOf(
0x12FE817D, // Salmon
0x12FEAE97, // Deep Peach
0x12FEDDBC, // Beige
0x12C4DED2, // Light Cyan
0x12A3EBDE, // Powder Blue
0x12FFFFFF // White
)
)
val MONOCHROME = IrBuiltinColorsPalette(
DEFAULT_ERROR_COLOR,
arrayOf(
0x126B6B6B, // Onyx
0x127C7C7C, // Dim Gray
0x128E8E8E, // Gray
0x12A0A0A0, // Silver
0x12B1B1B1, // Quick Silver
0x12C3C3C3 // Silver Chalice
)
)
val SOLARIZED = IrBuiltinColorsPalette(
DEFAULT_ERROR_COLOR,
arrayOf(
0x12CFA000, // Green-Gold
0x12E1661C, // Pumpkin
0x12F03A37, // Fresh Blood
0x12F15098, // Pink
0x123095E6, // Dodger Blue
0x1238B2A2 // Sea Green
)
)
}
}

Expand Down Expand Up @@ -132,6 +209,13 @@ object IrColors {
return when (config.paletteType) {
IrColorsPaletteType.DEFAULT -> IrBuiltinColorsPalette.DEFAULT
IrColorsPaletteType.PASTEL -> IrBuiltinColorsPalette.PASTEL
IrColorsPaletteType.SPECTRUM -> IrBuiltinColorsPalette.SPECTRUM
IrColorsPaletteType.RAINBOW_SPECTRUM -> IrBuiltinColorsPalette.RAINBOW_SPECTRUM
IrColorsPaletteType.NIGHTFALL -> IrBuiltinColorsPalette.NIGHTFALL
IrColorsPaletteType.AQUAFLOW -> IrBuiltinColorsPalette.AQUAFLOW
IrColorsPaletteType.LUMINARIUM -> IrBuiltinColorsPalette.LUMINARIUM
IrColorsPaletteType.MONOCHROME -> IrBuiltinColorsPalette.MONOCHROME
IrColorsPaletteType.SOLARIZED -> IrBuiltinColorsPalette.SOLARIZED
IrColorsPaletteType.CUSTOM -> IrCustomColorsPalette.getInstance(config)
}
}
Expand Down
69 changes: 69 additions & 0 deletions src/main/kotlin/indent/rainbow/IrColorsNew.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,68 @@ class IrColorsPaletteNew(val errorColor: Color, val indentColors: Array<Color>)
// https://github.com/oderwat/vscode-indent-rainbow/pull/64
val PASTEL = IrColorsPaletteNew(0x26C7CEEA, 0x26B5EAD7, 0x26E2F0CB, 0x26FFDAC1, 0x26FFB7B2, 0x26FF9AA2)

val SPECTRUM = IrColorsPaletteNew(
0x121E90FF, // Dodger Blue
0x128A2BE2, // Dark Violet
0x12FF0000, // Red
0x12FF8C00, // Dark Orange
0x12FFD700, // Gold
0x1232CD32 // Green
)

val RAINBOW_SPECTRUM = IrColorsPaletteNew(
0x12FF0000, // Red
0x12FF8C00, // Dark Orange
0x12FFD700, // Gold
0x1232CD32, // Green
0x121E90FF, // Dodger Blue
0x128A2BE2 // Dark Violet
)

val NIGHTFALL = IrColorsPaletteNew(
0x120052A2, // Navy
0x1254589F, // Medium Purple
0x12D47796, // Dusty Dark Rose
0x12FFA3A1, // Salmon
0x12FFEABD, // Peach
0x12FFC07A // Goldenrod
)

val AQUAFLOW = IrColorsPaletteNew(
0x1222237D, // Dark Blue
0x122A3A88, // Prussian Blue
0x12355A97, // Medium Blue
0x12417CA7, // Cerulean
0x124C9CB6, // Light Blue
0x1281C8d8 // Sky Blue
)

val LUMINARIUM = IrColorsPaletteNew(
0x12FE817D, // Salmon
0x12FEAE97, // Deep Peach
0x12FEDDBC, // Beige
0x12C4DED2, // Light Cyan
0x12A3EBDE, // Powder Blue
0x12FFFFFF // White
)

val MONOCHROME = IrColorsPaletteNew(
0x126B6B6B, // Onyx
0x127C7C7C, // Dim Gray
0x128E8E8E, // Gray
0x12A0A0A0, // Silver
0x12B1B1B1, // Quick Silver
0x12C3C3C3 // Silver Chalice
)

val SOLARIZED = IrColorsPaletteNew(
0x12CFA000, // Green-Gold
0x12E1661C, // Pumpkin
0x12F03A37, // Fresh Blood
0x12F15098, // Pink
0x123095E6, // Dodger Blue
0x1238B2A2 // Sea Green
)
fun parse(palette: String): IrColorsPaletteNew? {
val colors = palette
.split(',')
Expand All @@ -39,6 +101,13 @@ val IrConfig.currentPalette: IrColorsPaletteNew
get() = when (paletteType) {
IrColorsPaletteType.DEFAULT -> IrColorsPaletteNew.CLASSIC
IrColorsPaletteType.PASTEL -> IrColorsPaletteNew.PASTEL
IrColorsPaletteType.SPECTRUM -> IrColorsPaletteNew.SPECTRUM
IrColorsPaletteType.RAINBOW_SPECTRUM -> IrColorsPaletteNew.RAINBOW_SPECTRUM
IrColorsPaletteType.NIGHTFALL -> IrColorsPaletteNew.NIGHTFALL
IrColorsPaletteType.AQUAFLOW -> IrColorsPaletteNew.AQUAFLOW
IrColorsPaletteType.LUMINARIUM -> IrColorsPaletteNew.LUMINARIUM
IrColorsPaletteType.MONOCHROME -> IrColorsPaletteNew.MONOCHROME
IrColorsPaletteType.SOLARIZED -> IrColorsPaletteNew.SOLARIZED
IrColorsPaletteType.CUSTOM -> cachedData.customColorPalette ?: IrColorsPaletteNew.PASTEL
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/indent/rainbow/settings/IrConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ data class IrConfig(
}
}

enum class IrColorsPaletteType { DEFAULT, PASTEL, CUSTOM }
enum class IrColorsPaletteType { DEFAULT, PASTEL, SPECTRUM, RAINBOW_SPECTRUM, NIGHTFALL, AQUAFLOW, LUMINARIUM, MONOCHROME, SOLARIZED, CUSTOM }
25 changes: 23 additions & 2 deletions src/main/kotlin/indent/rainbow/settings/IrConfigurable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,27 @@ class IrConfigurable : BoundConfigurable("Indent Rainbow") {
row {
radioButton("Pastel (6 colors)", IrColorsPaletteType.PASTEL)
}
row {
radioButton("Spectrum (6 colors)", IrColorsPaletteType.SPECTRUM)
}
row {
radioButton("Rainbow Spectrum (6 colors)", IrColorsPaletteType.RAINBOW_SPECTRUM)
}
row {
radioButton("Nightfall (6 colors)", IrColorsPaletteType.NIGHTFALL)
}
row {
radioButton("Aquaflow (6 colors)", IrColorsPaletteType.AQUAFLOW)
}
row {
radioButton("Luminarium (6 colors)", IrColorsPaletteType.LUMINARIUM)
}
row {
radioButton("Monochrome (6 colors)", IrColorsPaletteType.MONOCHROME)
}
row {
radioButton("Solarized (6 colors)", IrColorsPaletteType.SOLARIZED)
}
row {
val radioButton = radioButton("Custom with colors:", IrColorsPaletteType.CUSTOM)
val commentText =
Expand All @@ -53,8 +74,8 @@ class IrConfigurable : BoundConfigurable("Indent Rainbow") {
val slider = slider(min, max, 0, 0)
slider.labelTable(
hashMapOf(
min to JLabel("Less opacity"),
max to JLabel("More opacity"),
min to JLabel("Transparent"),
max to JLabel("Opaque"),
0 to JLabel("Default"),
)
)
Expand Down