Revit Color Picker

Revit Color Picker

Anonymous
Not applicable
11,140 Views
14 Replies
Message 1 of 15

Revit Color Picker

Anonymous
Not applicable

Is there an API call to bring up the Revit Color Picker?

Revit Color Picker.png

 

Thanks,

Joe

0 Likes
11,141 Views
14 Replies
Replies (14)
Message 2 of 15

jeremytammik
Autodesk
Autodesk

Dear Joe,

 

Nothing that I am aware of.

 

If you really want, you might try using PostCommand to bring it up somehow.

 

That would just display it, though, I guess, with no control over what the user does then, or any way to retrieve the results.

 

Sorry.

 

What do you want to achieve?

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 15

Anonymous
Not applicable

My client needs the Graphics Overrides integrated with their custom app.

overridegraphics.png

No problem, I can use the standard Windows color picker and they just won't have access to "Pantone", "Use Default" and the Original/New colors.

 

Thanks for the reply.

Joe

0 Likes
Message 4 of 15

Anonymous
Not applicable
Having access to the Revit color picker would help 3rd party apps appear better integrated with Revit.
0 Likes
Message 5 of 15

Revitalizer
Advisor
Advisor

Hi,

 

finally, in Revit 2017 API, there is  a ColorSelectionDialog class.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 6 of 15

matthew_taylor
Advisor
Advisor
Beet me to it! 😉

Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 7 of 15

Anonymous
Not applicable
Thank you for the response
0 Likes
Message 8 of 15

GallowayUS_com_RonAllen2
Collaborator
Collaborator

@jeremytammik  - sorry to revive such an old thread- but is there a way to Replace the current color picker API with a custom API?

 

In Revit 24 we have the color books- but I was thinking about creating something that would allow filtering on ranges of HSV against the color books. Sherwin Williams has more than 5000 colors in their current library - would be great if we could filter those down, and subsequently find complementary or harmonic color sets as well.

 

Just need to find an IN to replace those ancient color pickers and color books!

Ron Allen
Galloway BIM
0 Likes
Message 9 of 15

matthew_taylor
Advisor
Advisor
A little off topic, but did you know you can add custom colours to the colour picker?

https://help.autodesk.com/view/RVT/2023/ENU/?guid=GUID-37DAECBA-58AA-4937-942A-3230631AA11E


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 10 of 15

GallowayUS_com_RonAllen2
Collaborator
Collaborator

@matthew_taylor - yep - and note the values are stored there as GBR or BRG not RGB. I put a ticket in 2015 and again this past year.... either difficult to fix or not a top priority ; )

 

 

Ron Allen
Galloway BIM
Message 11 of 15

jeremy_tammik
Alumni
Alumni

You can definitely implement your own colour picker independently of the one provided by Revit. After all, you just need to talk with the user and ask her for a colour value using any colour system of your choice.

  

Here are some notes on a colour picker and neat colour systems:

  

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 12 of 15

GallowayUS_com_RonAllen2
Collaborator
Collaborator

@jeremy_tammik  Great resources : )
-can we replacing the color picker altogether?

Is the color picker integrated in the Revit API or is it a separate DLL?

I.e. is there a way when I select (1) or any other color entry I can replace the (2) color picker interface in the API?

RonAllen_WareMalcombcom_0-1681492333291.png

Thanks Jeremy! Looking to see if its possible then I'll begin checking and coding it!

Ron Allen
Galloway BIM
0 Likes
Message 13 of 15

jeremy_tammik
Alumni
Alumni

I am not aware of any way to replace the built-in colour picker. Wouldn't it be easier to implement your own separate one, use that to prompt the user for colours, and then smuggle the selected values into Revit in the appropriate places?

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 14 of 15

GallowayUS_com_RonAllen2
Collaborator
Collaborator

@jeremy_tammik -We could drag and drop but we'd only get the RGB right?.

 

I was hoping I could leverage a better version with color books to narrow down selections based on user filter inputs. I.e. HSV Min/Max, color picking min/max, etc.

 

That would open the door to filtering entire sets of color books based on name, color, value, complementary and harmonic colors, etc. in an allowable range opening up a variety of options - later extendable the idea to PBR materials.

Ron Allen
Galloway BIM
0 Likes
Message 15 of 15

jeremy_tammik
Alumni
Alumni

Dear Ron,

 

Thank you for your parallel DAS query 20364130 [Revit API Color Picker alternative]. As I answered there, this discussion forum is the preferred method to submit non-confidential DAS queries or requests on the Revit API like this. Any thread that you submit there using your email address registered as a DAS member will be recognised as such and automatically escalated to us in the DAS team. At the same time, you will address a larger audience, more of your peers will see it, be able to chip in and help, and more people will see and profit from the answers we provide. We therefore prioritise cases from the discussion forum.

 

As far as I understand, any and all colour systems are perfectly equivalent in their end result. An RGB value can be converted with no loss to any other system and vice versa. Also, certain systems (maybe Revit included?) can only consume a specific colour system as input (maybe RGB?). So, implementing a colour picker based on a different system is all good and fine, but the final end result may still need to be represented in RGB in order to be passed in to Revit.

 

Am I correct in that assumption? I don't know for sure!

 

As mentioned above, you can certainly implement your own colour picker and support for other colour systems or books to prompt the user to select specific colour values, so I think the refinements that you list are achievable. I  just wonder where you want to make use of them inside of Revit. What would be the drag and drop target? Can you explain the desired workflow and usage, please?  Thank you!

 

Cheers,

 

Jeremy

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes