omp packages

pi-onehalf0.1.0

One Half Dark and Light color themes for Pi, ported from sonph/onehalf.

jalonsodev Published 7 days ago MIT ~404 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

One Half for Pi

Two JSON color themes for Pi: One Half Dark (onehalf-dark) and One Half Light (onehalf-light). This is a port of One Half, created by Son A. Pham (@sonph) and based on Atom's One.

The package provides themes only: no executable extensions, runtime dependencies, or installation hooks. It does not change your terminal configuration.

Try it locally

From this repository's root:

pi -e .

Open /settings, select Theme, and choose onehalf-dark or onehalf-light.

To select a theme for one invocation without changing the saved selection:

pi -e . --use-theme onehalf-dark
pi -e . --use-theme onehalf-light

To keep the local package installed, run pi install .. Personal installation updates Pi's settings; add --local for a project-scoped installation, which requires project trust.

Install from Git or npm

Release preparation only: no remote release or npm publication is claimed. The Git command works only after the package files are committed and available at the remote. npm installation works only after the owner confirms the name and publishes the package.

pi install git:github.com/jorgealonsodev/onehalf
# After an npm release under this name:
pi install npm:pi-onehalf

Prefer a published Git tag/commit or exact npm version when reproducible installation matters. Use pi list to inspect configured packages and pi remove <source> to remove one.

Automatic light/dark selection

Use this Pi setting after making both themes available:

{
  "theme": "onehalf-light/onehalf-dark"
}

The light name comes first. Pi selects according to the appearance it detects from the terminal, including its documented fallbacks; the package does not detect the operating system's appearance itself.

After changing a package theme, run /reload. Package themes do not use the automatic hot reload reserved for active themes in Pi's user theme directory.

Implementation details

For a quick review, inspect package.json first, then the two files in themes/. The tables below explain the palette choices and every role; no extension code is involved.

Palette and fidelity

The core palette is unchanged from upstream:

Variable Dark Light
background #282c34 #fafafa
foreground #dcdfe4 #383a42
red #e06c75 #e45649
green #98c379 #50a14f
yellow #e5c07b #c18401
blue #61afef #0184bc
magenta #c678dd #a626a4
cyan #56b6c2 #0997b3

Secondary colors and deliberate adaptations

Variable Dark Light Rationale
muted #919baa #686973 Dark uses upstream gutter text; light is a darker adaptation. Original comments (#5c6370 / #a0a1a7) are too faint for Pi's secondary interface text.
panel #313640 #f0f0f0 Upstream cursor-line surfaces.
selection #474e5d #bfceff Upstream selection surfaces.
custom #2e323c #eeeef6 Derived neutral/magenta-tinted custom message surface.
successBg #313640 #f0f0f0 Neutral upstream panel surface, shared with pending tools. Success indicators and added diff lines remain green.
errorBg #3c3039 #fbeceb Derived red-tinted tool-error surface.

Pi combines upstream syntax groups into fewer roles: syntaxKeyword follows Vim's red Keyword, while other upstream Statement groups are magenta. Pi-specific reasoning levels use seven distinct palette colors rather than implying a linear brightness scale. HTML backgrounds are explicit.

Gentle Shell panels

Gentle Shell 4.3.0 reuses Pi's toolSuccessBg for informational and successful floating panels, including Status. Warning/stale Todos use toolPendingBg; errors use toolErrorBg. The first two backgrounds are deliberately neutral in this port. The package adds no custom theme fields, extension code, or installation patches.

If a header or sidebar retains the previous palette after selecting a theme, run /reload or restart with the selected theme. This is refresh guidance, not a verified fix for every Gentle Shell cache path; live header/sidebar refresh has not been reproduced or certified here.

Complete role mapping

Both variants use this same mapping; each variable resolves to that variant's palette.

Pi role Palette variable
accent blue
border muted
borderAccent blue
borderMuted selection
success green
error red
warning yellow
muted muted
dim muted
text foreground
thinkingText muted
selectedBg selection
scrollbarTrack selection
scrollbarThumb muted
searchMatchBg selection
searchMatchText foreground
userMessageBg panel
userMessageText foreground
customMessageBg custom
customMessageText foreground
customMessageLabel magenta
toolPendingBg panel
toolSuccessBg successBg
toolErrorBg errorBg
toolTitle foreground
toolOutput foreground
mdHeading green
mdLink blue
mdLinkUrl muted
mdCode cyan
mdCodeBlock foreground
mdCodeBlockBorder muted
mdQuote muted
mdQuoteBorder cyan
mdHr muted
mdListBullet magenta
toolDiffAdded green
toolDiffRemoved red
toolDiffContext muted
syntaxComment muted
syntaxKeyword red
syntaxFunction blue
syntaxVariable red
syntaxString green
syntaxNumber yellow
syntaxType yellow
syntaxOperator foreground
syntaxPunctuation foreground
thinkingOff muted
thinkingMinimal cyan
thinkingLow blue
thinkingMedium green
thinkingHigh yellow
thinkingXhigh magenta
thinkingMax red
bashMode green
HTML export role Palette variable
pageBg background
cardBg panel
infoBg custom

Compatibility and verification

Target CLI: Pi 1.3.0. Theme roles follow its versioned JSON schema. Other Pi versions are not claimed as tested.

Pi themes color supported UI roles, not the entire terminal. For a matching canvas, configure One Half in your terminal emulator too. Truecolor is recommended; Pi approximates colors on 256-color terminals. This port does not claim full accessibility compliance or identical rendering across terminals.

Run dependency-free contract tests with Node.js 22 or later:

npm test
npm pack --dry-run --json

The tests check complete role coverage, variable resolution, original palette values, semantic mappings, package isolation, attribution, and documentation. They are not a general JSON Schema validator or a substitute for visual inspection. Full schema validation and real-Pi checks are recorded separately in the verification report in the source repository (not shipped in the theme tarball).

Attribution and source reference

Original theme: One Half by Son A. Pham. This package is a Pi adaptation, not an original color scheme or an official upstream release; no upstream endorsement is implied.

Upstream reference: 75eb2e97acd74660779fed8380989ee7891eec56.

License

MIT. The complete original license and Copyright (c) 2019 Son A. Pham <sp@sonpham.me> notice are preserved in LICENSE. The port is distributed under the same license.

Next step

Try pi -e ., select one of the two themes in /settings, and use the verification report to distinguish automated checks from visual acceptance. The repository link becomes available only after the owner publishes these files.