Darcula Forest
A dark green color scheme, derived entirely in Oklch from a few initial constraints.
Generating variants is as easy as selecting your favorite color and clicking download.
Drag the knobs — everything changes live.
Code Preview
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@Service
class UserService(
private val users: UserRepository,
private val emailService: EmailService
) {
companion object {
private val MAX_RETRIES = 3
}
fun findByEmail(email: String): User? {
// look up user by their email address
val result = users.getByEmail(email)
result?.let { it ->
logger.info("Found user: ${it.name}")
}
return result
}
}
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
/**
* Returns the sum of its arguments,
* throwing an exception if the result overflows an {@code int}.
*
* @param x the first value
* @param y the second value
* @return the result
* @throws ArithmeticException if the result overflows an int
* @since 1.8
*/
@IntrinsicCandidate
public static int addExact(int x, int y) {
int r = x + y;
// Overflow if both arguments have the opposite sign of the result
if ((x ^ r) & (y ^ r)) < 0) {
throw new ArithmeticException("integer overflow");
}
return r;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Top customers by revenue in the last 30 days
SELECT
c.email,
r.revenue,
RANK() OVER (ORDER BY r.revenue DESC) AS rank,
CASE
WHEN r.revenue > 1000 THEN 'whale'
WHEN r.revenue > 100 THEN 'regular'
ELSE 'small'
END AS tier
FROM recent_orders r
JOIN customers c ON c.id = r.customer_id
ORDER BY r.revenue DESC
LIMIT 25;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
const rollDie = (): Promise<number> => {
return new Promise((resolve, reject) => {
const fair = Math.random() > 0.01;
if (fair) {
resolve(Math.floor(Math.random() * 6) + 1);
} else {
reject("die fell off the table");
}
});
};
rollDie()
.then(value => console.log(`Rolled ${value}`))
.catch(err => console.error(err));
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
class RetryPolicy(
private val maxRetries: Int = 3,
private val maxRetries: Int = 5,
private val backoff: Duration = 200.milliseconds,
) {
fun delayFor(attempt: Int): Duration =
backoff * (1 shl attempt)
// TODO: add jitter
fun shouldRetry(attempt: Int) = attempt < maxRetries
fun shouldRetry(attempt: Int) = attempt <= maxRetries
}
~/projects/darcula-forest master ❯ ls --color
darcula site src build.gradle.kts gradlew palette.css README.md
~/projects/darcula-forest master ❯ git status --short
AM TODO.md
M site/index.html
?? preview-ux-plan.md
~/projects/darcula-forest master ❯ ./gradlew jvmTest
w: file:///src/Main.kt:12:9 Parameter 'args' is never used
BUILD SUCCESSFUL in 4s
~/projects/darcula-forest master ❯ █
Palette
Editor Colors
-
Background TEXT
-
Foreground TEXT / DEFAULT_IDENTIFIER
-
Caret Row CARET_ROW_COLOR
-
Selection SELECTION_BACKGROUND
-
Search Result SEARCH_RESULT_ATTRIBUTES
-
Line Number LINE_NUMBERS_COLOR
Syntax Colors
-
Keyword / Punctuation DEFAULT_KEYWORD / DEFAULT_COMMA / SEMICOLON
-
Static Method (Kotlin) DEFAULT_STATIC_METHOD
-
Constant / Field DEFAULT_CONSTANT / INSTANCE_FIELD / STATIC_FIELD
-
Named Argument KOTLIN_NAMED_ARGUMENT
-
Implicit Parameter IMPLICIT_ANONYMOUS_CLASS_PARAMETER
-
Function Declaration DEFAULT_FUNCTION_DECLARATION
-
Number / Label DEFAULT_NUMBER / KOTLIN_LABEL
Strings
-
String / Annotation DEFAULT_STRING / ANNOTATION
-
String Escape (valid) DEFAULT_VALID_STRING_ESCAPE
-
String Escape (invalid) DEFAULT_INVALID_STRING_ESCAPE
Effects
-
Error ERRORS_ATTRIBUTES
-
Warning Background WARNING_ATTRIBUTES
-
Mutable Variable Underline KOTLIN_MUTABLE_VARIABLE
-
Typo Underline TYPO
Comments
-
Comment DEFAULT_LINE_COMMENT / BLOCK_COMMENT
-
JavaDoc DEFAULT_DOC_COMMENT / DEFAULT_DOC_COMMENT_TAG
-
JavaDoc Tag Value DEFAULT_DOC_COMMENT_TAG_VALUE
-
TODO TODO_DEFAULT_ATTRIBUTES
Diff
-
Diff Delete DIFF_DELETED
-
Diff Change DIFF_MODIFIED
-
Diff Add DIFF_INSERTED
-
Diff Conflict DIFF_CONFLICT
Get the theme
IntelliJ
Settings → Editor → Color Scheme → ⚙ → Import Scheme (
.icls). The .theme.json UI theme ships as a plugin.VS Code
Put both in
~/.vscode/extensions/darcula-forest/ (theme under themes/), reload, then pick it in Preferences → Color Theme.Zed
Copy to
~/.config/zed/themes/, then pick it in the theme selector.Alacritty
Import from
~/.config/alacritty/alacritty.toml: [general] import = ["darcula-forest.toml"]kitty
Copy to
~/.config/kitty/, then include darcula-forest.conf in kitty.conf.Ghostty
Copy to
~/.config/ghostty/themes/, then theme = darcula-forest.WezTerm
Copy to
~/.config/wezterm/colors/, then config.color_scheme = 'Darcula Forest'.foot
Copy to
~/.config/foot/, then include=~/.config/foot/darcula-forest.ini in foot.ini.Warp
Copy to
~/.warp/themes/, then pick it in Settings → Appearance.Windows Terminal
Paste the object into
schemes in settings.json, then set colorScheme.iTerm2
Double-click to import, then pick it under Profiles → Colors → Color Presets.
tmux
source-file ~/.config/tmux/darcula-forest.tmux.conf from tmux.conf.Zellij
Copy to
~/.config/zellij/themes/, then theme "darcula-forest" in config.kdl.T3 Code
Import in T3 Code's theme settings.
Helix
Copy to
~/.config/helix/themes/, then :theme darcula-forest.Neovim
Copy to
~/.config/nvim/colors/, then :colorscheme darcula-forest.Vim
Copy to
~/.vim/colors/; needs set termguicolors.btop
Copy to
~/.config/btop/themes/, then pick it in Options.lazygit
Merge into
config.yml, or layer via LG_CONFIG_FILE="<config>,<this file>".delta
[include] path = <file> in ~/.gitconfig, then [delta] features = darcula-forest.fzf
source it from ~/.zshrc; appends to FZF_DEFAULT_OPTS.starship
Merge into
starship.toml; keep palette = … above the first section.CSS
oklch() custom properties; this page is styled with it.Everything
All of the above in one zip.