designcoding
About Table of Contents Keywords Monthly Archive
Support designcoding!

Rhino Viewport Colors

August 8, 2023 | Algorithms
#rhinoceros #vbnet #visualization

Recently I found this VB.net component in an old Grasshopper project. I am not sure if it is mine or not, but I wanted to share it with you. This code modifies Rhino viewport colors quickly without entering the Rhino options window. I frequently modify the viewport colors and grid settings to create renders or animations within Grasshopper. This is why, this component might be useful in making quick modifications to the screen colors. Here is the VB.net code inside of the component:

Private Sub RunScript(ByVal D As Boolean, ByVal B As System.Drawing.Color, ByVal G As System.Drawing.Color) 
	If D = True Then
		Rhino.ApplicationSettings.AppearanceSettings.ViewportBackgroundColor = Color.FromArgb(0, 157, 163, 170)
	End If
	If D = False Then
		Rhino.ApplicationSettings.AppearanceSettings.ViewportBackgroundColor = B
	End If
	Rhino.ApplicationSettings.AppearanceSettings.GridThickLineColor = G
	Rhino.ApplicationSettings.AppearanceSettings.GridThinLineColor = G
	Rhino.ApplicationSettings.AppearanceSettings.GridXAxisLineColor = G
	Rhino.ApplicationSettings.AppearanceSettings.GridYAxisLineColor = G
	Rhino.ApplicationSettings.AppearanceSettings.GridZAxisLineColor = G
End Sub 

As you can see, it only has several conditional statements, modifying the methods from Rhinocommon. You can copy and paste this component into your definition. It should work immediately, modifying the Rhino settings. By switching the first input (Default), you can always revert back to the default Rhino viewport colors. However, unfortunately, I couldn’t find a method to hide the grid. Thus, if you want to close the grid, you can just connect the same viewport background color to the grid color as a workaround.

Rhino Viewport Colors rhinoceros, vbnet

It would be interesting to advance this more by reading Rhinocommon and developing a better and more capable add-on for Grasshopper. In addition to Rhino viewport colors and grid settings, some other options can be better altered via a similar component. I am not sure I have enough time for this but maybe one day I can work on it. However, I hope this is already useful for some people. Maybe a Grasshopper Python equivalent might be another good exercise.

Grasshopper definition (GH)Download

Cite this post

Yazar, T. (2023, August 8). Rhino Viewport Colors. designcoding. Retrieved August 24, 2026, from https://www.designcoding.net/rhino-viewport-colors/

Related Posts

Manage Rhino Viewport in Grasshopper

September 13, 2013

This simple vb.net component controls the Rhino viewport background without a need to enter its options panel. It is used to change the viewport background color and grid visibility quickly within Grasshopper. Here is the definition file: [GHX: 0.9.0056]. In order to be able to return to default settings, I put a “default” toggle. Just click on it to “false” state, then the Rhino background color can be changed by the B input. This component also handles the grid. However I…

Rhinoceros Layout Tutorial

December 14, 2024

In Rhino, layouts are used to prepare drawings for printing or presentation. They provide a way to organize and display 2D views of your 3D model, such as top, front, side, and perspective views, in a way suitable for producing printed or published documents. In this short tutorial video, I show the basic usage of the Rhinoceros layout system. So, this Rhinoceros Layout Tutorial video is for beginner-level CAD users. Therefore, you can use it to create PDF posters and…

Rhino Print Dialog

November 2, 2013

Here is a simple description of Rhinoceros’ Printing dialog. It is the same with version 4.0, nothing changed in layout and printing dialogs in 5.0. Significantly our Architectural Geometry classes should benefit from this explanation. Most of these options should be tested with a plotter (e.g. pencil widths) before final print-outs. Also, you may try creating a PDF file of your homework from this dialog.

Scripting Tab in Rhino 5

December 11, 2012

Last year, I posted a way to create a Grasshopper command button in Rhino 4 (here). As the scripting possibilities increase in Rhino 5, the new tab feature can be used to put them together. I’ve made 4 of the most used platforms in a tab named “Scripting”. Here is how I did it; Use right-click on the empty area to open the above menu and select “new tab” to create an empty tab, naming it “Scripting. Right-click on the…

Some Rhino Tips

February 15, 2012

Here are three technical tips, that might help you model in Rhinoceros faster. In most cases, you’ll find CTRL+F1,F2,F3 and F4 very helpful in modeling and transforming objects in digital space. These key combinations will focus you on Top, Front, Left and Perspective views (maximized) respectively. Also, when you try to express your design process (especially supporting geometries) using different linetypes, it’s possible that you’ll never like those preset linetypes. By choosing Tools / Options, you’ll have the opportunity to change and add new…

  • Chapters

    • Algorithms
    • Discourses
    • Fabrications
    • Studios
  • Explore

    • All Keywords
    • Table of Contents
    • Monthly Archive
    • #tutorial
    • #polyhedra
    • #unrolling
    • #archimedean-solid
    • #platonic-solid
    • #parametric-surface
    • #relief
    • #folding
    • #truncated
    • #icosahedron
    • #buckminster-fuller
    • #euclidean-construction
    • #tessellation
    • #icosidodecahedron
    • #dodecahedron
    • #stellated-solid
    • #octahedron
    • #tetrahedron
    • #deformation
    • #pattern
  • Search

  • Support designcoding!

  • Enjoying designcoding? Support me on Patreon to keep it growing. Thank you!

  • copyright 2026 designcoding.net | about | privacy policy | end user license agreement