Skip to content

fix(core.components):Fix border and title color hex bug in Panel component.#165

Merged
TeseySTD merged 1 commit intoRazorConsole:mainfrom
TeseySTD:fix/panel-color-hex
Nov 22, 2025
Merged

fix(core.components):Fix border and title color hex bug in Panel component.#165
TeseySTD merged 1 commit intoRazorConsole:mainfrom
TeseySTD:fix/panel-color-hex

Conversation

@TeseySTD
Copy link
Member

Overview

When I tried to change panel color to some Hex value (method Color.FromHex) then I faced with issue - color was not applied or render freeze because of uncaught exception.

Problem cause

Problem was in incorrect style conversion:

private string? BorderColorAttribute => BorderColor?.ToString();

ToString in hex case returns non-markup translation, so style parser falls:

exception screenshot

Solution:

Just changing ToString method to ToMarkup makes the trick.

Copy link
Collaborator

@ParadiseFallen ParadiseFallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TeseySTD TeseySTD merged commit 635aa9b into RazorConsole:main Nov 22, 2025
5 checks passed
@github-actions github-actions bot added this to the v0.2.0 milestone Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants