# How-To: Define highlight style

**URL:** <https://forum.techsoft3d.com/t/how-to-define-highlight-style/1419>\
**Category:** HOOPS Visualize Desktop\
**Tags:** code, sample, knowledge-base, how-to\
**Created:** [June 4, 2022, 4:00am UTC](https://forum.techsoft3d.com/t/how-to-define-highlight-style/1419 "2022-06-04T04:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel.peragine](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/gabriel.peragine/32/1535_2.png) [@gabriel.peragine](https://forum.techsoft3d.com/u/gabriel.peragine)\
**Post date:** [June 4, 2022, 4:00am UTC](https://forum.techsoft3d.com/t/how-to-define-highlight-style/1419/1 "2022-06-04T04:00:00Z")

</div>

The default highlight style is defined with the name “highlight\_style”. But you can define your highlight style.

```auto
HPS.SegmentKey highlightStyle = HPS.Database.CreateRootSegment();
highlightStyle.GetMaterialMappingControl().
              SetFaceColor(new RGBAColor(1, 0, 0)).
              SetEdgeColor(new RGBAColor(1, 0, 0)).
              SetVertexColor(new RGBAColor(1, 0, 0)).
              SetMarkerColor(new RGBAColor(1, 0, 0)).
              SetLineColor(new RGBAColor(1, 0, 0)).
              SetTextColor(new RGBAColor(1, 0, 0));

HPS.PortfolioKey portfolio = GetSprocketsControl().Canvas.GetPortfolioKey();
portfolio.DefineNamedStyle("my_highlight_style", highlightStyle);

HPS.HighlightOptionsKit highlight_options = HPS.HighlightOptionsKit.GetDefault();
highlight_options.SetStyleName("my_highlight_style");

```
