color-highlighter

Highlight color codes in your Obsidian notes.

MIT License

Stars
7
Committers
1
color-highlighter - 0.7.0 Latest Release

Published by heatherpiper 2 months ago

What's New

  • New feature - You can now override the default highlight style on a per-note basis using a note's frontmatter (properties) (#11).
    • Add highlightStyle as a new property to a note's frontmatter and indicate which style you want to use for that note. The available options are background, border, square, or underline.
    • Example:
       ---
       highlightStyle: underline
       ---
      
    • If no valid highlightStyle property is found, the default style indicated in the settings will be used.
    • To easily set a note's highlight style, open the command palette and select Color Highlighter: Set highlight style for this note, then choose your preferred highlight style from the dropdown menu.
  • Style fixes
    • Fixed an issue with the contrast border for background style highlights displaying with a gap.
    • Fixed an issue where color codes styled as strikethroughs appeared to have a gap on either side of them (#8).
color-highlighter - 0.6.0

Published by heatherpiper 2 months ago

What's new

  • New settings:
    • You can now adjust the vertical padding, horizontal padding, and border radius of background style highlights.
    • You can now adjust the border thickness and border radius or border style highlights.
    • You can now adjust the border radius of square style highlights and choose the position of square, either before or after the color code text.
    • You can now adjust the thickness of underline style highlights.
  • Fix: Strikethrough formatting now applies to the square when using square style highlights.
  • Code optimization
    • Refactored highlightStyle to use TypeScript enum rather than string literals for type safety.

[!TIP]
See README for examples of how to use the new highlight style adjustment settings.

color-highlighter - 0.5.2

Published by heatherpiper 3 months ago

What's new

  • New setting: If you use the square style highlight, you can now choose to scale the size of the square with the text size. If this setting is disabled, the square will always be 10 x 10 pixels.
  • UI enhancement: The cursor color (--caret-color) now matches the text color for background highlights to ensure it has the appropriate contrast to be visible within all highlight colors.
  • General enhancement: Changes made in settings are now instantly reflected in open notes without needing to reload them.
  • General enhancement: Tags are now excluded from highlighting in all viewing modes, both inline and in yaml frontmatter.
  • Code optimizations
    • Migrated all style assignment to use CSS stylesheet instead of assigning styles in JavaScript
    • Refactored editorExtension for improved modularity
color-highlighter - 0.5.1

Published by heatherpiper 3 months ago

What's new:

  • Fixed the color picker hover area not extending to square highlights in headings
    • Improved target element detection for hover events
  • Color regex is now case insensitive.
  • Reverted square highlights back to a 10 x 10 pixel square (previously was 1em x 1em, which scaled with text)
  • Fixed colors being blended with the editor background color only if they have an alpha channel.
  • Moved styles to a separate styles.css file
  • Removed casting to any
  • Removed uses of innerHTML
  • Implemented custom types for color components and color strings.
color-highlighter - 0.5.0-beta

Published by heatherpiper 3 months ago

What's new

  • New setting: Use contrasting border for low-contrast highlights. This adds a faint border around highlights if there is not sufficient contrast between the highlight color and the editor's background color. This setting applies to the 'background' and 'square' highlight styles.
  • Bug fix: Fixed a bug which caused highlights to not work inside code blocks in Reading Mode if there was a coding language specified. Highlights within code blocks should now work consistently in all viewing modes.
  • When the 'square' highlight style is chosen, the hover area to show the color picker now extends to the square itself.
  • Small adjustments to highlight styles for cohesiveness.

Known issues

  • The color picker will not display fully if the hovered color code is inside a table cell. I hope to have this resolved in the next release.
color-highlighter - 0.4.0-beta

Published by heatherpiper 3 months ago

What's new

  • New feature: A color picker tool now appears when you hover over a highlighted color code (can be disabled in the settings).
    • You can also show the color picker by using the command Color Highlighter: Show color picker in the command palette. This command will work whether the hover behavior is enabled or not.
  • Updated wording and overall structure of the settings page for improved clarity.
  • The hash symbol in hex colors is now excluded from highlights in Source Mode. This solves a rendering issue caused by the use of escape characters before the hash symbol.
  • Improved code documentation and small optimizations.
color-highlighter - 0.3.0-beta

Published by heatherpiper 4 months ago

What's new

  • Major reorganization of the entire codebase for better modularity
  • Updates to configuration files and the build process
  • Introduction of a configuration object for regex patterns for easier color code pattern maintenance going forward
color-highlighter - 0.2.6-beta

Published by heatherpiper 4 months ago

What's new

  • Code optimization (removed unused leftover methods, better handling of null values)
  • Fixed an issue where the true background color was not being properly retrieved
color-highlighter - 0.2.5-beta

Published by heatherpiper 4 months ago

What's new

  • Fix background color not being processed properly, resulting in an error
  • Improved error handling
  • Small tweaks and optimizations
color-highlighter - 0.2.4-beta

Published by heatherpiper 4 months ago

What's new

  • Fixes Dataview inline queries inadvertently displaying on a new line.
  • Fixes callout icons disappearing when Color Highlighter is enabled.
  • Improves performance by reducing DOM manipulations.
color-highlighter - 0.2.3-beta

Published by heatherpiper 4 months ago

What's new

  • Fixes highlighting and text contrast adjustments for 8-digit hex codes.
  • Fixes highlighting and text contrast adjustments for 3- and 4-digit hex codes.
  • Fixes certain highlighting styles not working in some view modes
color-highlighter - 0.2.2-beta

Published by heatherpiper 4 months ago

[!IMPORTANT]
This release fixes a bug in the previous release that was causing highlighting to be broken for certain highlight styles in Reading Mode and Live Preview. This release rolls back the previous support for 3- and 4-digit hex codes. Shorthand hex codes are not highlighted in this release. This issue is fixed in newer releases.

What's new

  • Bug fixes.
color-highlighter - 0.2.1-beta

Published by heatherpiper 4 months ago

[!WARNING]
This release may break highlighting in Reading Mode and Live Preview. Please download the latest release instead.

What's new

  • Short-form HEX color codes (with three or four digits) are now supported.
  • Eight-digit HEX color codes are now supported.
  • Fixes certain highlight styles having excess padding.
  • Fixes monospace font being incorrectly applied to any highlighted color code.
  • Other minor fixes and adjustments.
color-highlighter - 0.2.0-beta

Published by heatherpiper 4 months ago

What's New

  • Adds three new highlight styles: Border, Colored Square, and Underline.
  • Adds support for HSLA formatted colors
  • Minor bug fixes
color-highlighter - 0.1.1-beta

Published by heatherpiper 4 months ago

What's New

  • HSLA formatted colors are now supported.
  • RGBA formatted colors now have their text contrast adjusted properly in Live Preview and Reading modes.
color-highlighter - 0.1.0-beta

Published by heatherpiper 4 months ago

Color Highlighter v0.1.0-beta

This is the initial release of Color Highlighter, an Obsidian plugin.

What's New

  • First public beta release
  • Core functionality implemented:
    • Color code highlighting in various formats
    • Customizable highlighting options
    • Automatic contrast adjustment for readability

Known Limitations

  • Limited color format support: Currently only supports HEX, RGB, RGBA, and HSL color formats.
  • Performance in large documents: May experience slower performance in very large documents with numerous color codes.
  • Theme compatibility: Highlighting may not be fully optimized for all Obsidian themes.
  • Mobile compatibility: Not yet extensively tested on mobile devices. Mobile users may encounter unexpected behavior.

Installation

Please refer to the README.md file for detailed installation instructions.

Feedback

As this is a beta release, your feedback is invaluable. Please test the plugin and report any issues or suggestions on the GitHub Issues page.

Related Projects