Change the color of object at runtime in opengles - iphone

I want to change the color of my object dynamically in OpenGLES.I put one button on the screen and whenever I click the button, it will show the color picker(Here I am using HUE color picker). And I want to apply that selected color to my object.As I am importing CPP class to colorpickerview class, it will giving the so many errors.Can any one help me out.

Related

Change safe area color in dark mode

I am using this code:
window?.safeAreaLayoutGuide.owningView?.backgroundColor =
UIColor(red:243.0/255.0, green:243.0/255.0, blue:243.0/255.0, alpha:1.0)
in SceneDelegate for change safe area color. And I want to change color of safe area for dark mode.
How can I do?
The best way to do this is to set up a Color Asset which has both light mode and dark mode variants included. This is simple to do, and once you have it set up, light/dark mode transitions will be handled automatically.
First, select your Assets.xcassets file, and right click anywhere within the left hand sidebar (under where it says "AccentColor" and "AppIcon"). This will open a popup menu; from there select "New Color Set." Now you should see a square named "Color" in the sidebar, and two squares labeled "Any Appearance" and "Dark" in the middle of the screen.
Next, click on one of those two squares. In the right hand sidebar, a color selector will pop up (with red, green, blue and opacity sliders, and the option to open the color selector panel). You can use these to set the RGB values you want for both light mode (the "Any Appearance" square) and dark mode.
Now that you've specified the color values, you still need a way to reference your new Color Asset from your code. This can be done with the UIColor(named: String) initializer. In Assets.xcassets, change the name from Color to whatever you want it to be called (I'll use "SafeAreaColor" as an example). Now, somewhere in your program (I usually do this in the Constants file) you should initialize the color:
let safeAreaColor = UIColor(named: "SafeAreaColor")
The last step is to incorporate this custom color into your existing code:
window?.safeAreaLayoutGuide.owningView?.backgroundColor = safeAreaColor
Now, your safe area should automatically change colors when the device shifts between Light and Dark mode.

GtkTreeView: how to stop selection bar overriding background-rgba setting

In my application the users can create a list of names associated with icons and colours. I've got the data stored in a GtkListStore and displayed using a GtkTreeView. The colour column is a GtkCellRendererText with the background-rgba property holding an opaque colour selected by the user. It looks like this.
However as you can see the selection bar hides the currently selected colour. The colour definition I've used in the CSS is alpha(#cce8ff, 0.5) and I know that the alpha is working because the colour fades out when I decrease the alpha value.
What I want is for the background colour in the cell to be visible through the selection highlight, although I could also live with the background colour blocking the selection highlight in that cell as long as the selected row was still clearly identified.
Is there some incantation I can use to achieve this? Or is this a bug in GTK3?
I'm using GTK 3.24.1 on Fedora 29. The application is written in Haskell using the gi-gtk binding.

Change the border's color of a button in Unity3D

I began to work with Unity3D since one month and I'm trying to do an application which contains a menu, composed by a panel and several buttons. At this moment, I'm trying to customize the menu, I change the fill color of the panel and buttons, but until now I could not change the border color of the buttons. There is any way to customize the border's color of the UI buttons? I would appreciate your help. :)
The easiest way to add an outline to your button is to use the Outline component (doc).
Simply add the Outline component where your button image or text is. Then configure it how you like it :)
The above results in the following button:
No, you can not change just border color. If you use default buttons, take a look at Source image. It is basically a grey square with black borders. So when you change color of image black color remains black.
To customize buttons as you want you need either create nested UI elements:
or create sprites with colors you want and replace source image
I find nested UI elements to be the easiest way to do something like this. Simple example:
Start out by creating a panel and change the scale until you get the desired size for your button. This will be your "borders".
Next create another panel as a child of the panel you just made and change the scale to be just slightly smaller than your first panel and change the color.
In the Inspector for your panel, add component and type in Button and add it as a component.
Finally, add a text as a child of your panel for a label and you're done.

Color Picker for specific Colors in touch UI AEM

I am using the colorPicker for a widget:
Now i dont want to show the shades of the color and want to add custom colors.
freestylePaletteTypeboolean
Displays the freestyle mode without palette shades.
this property is not working and the colors-name under colors node is also not working.
Please help.
Here's a starting point for implementing a color picker in AEM.
There's also a color palette picker example here that could provide inspiration.

Starling Feathers Extend Theme - Custom button

I am trying to work out how to use a sprite added to a themes sprite sheet as a button but not having much luck.
I have created the entire button with click state and label and added to the theme sprite sheet and need to use on a button. I have a number of custom buttons I would like to use but I would also like to use a number of the theme skin (Minimal skin).
I have looked at the extending themes section but unsure how to use a signal sprite image for 1 button, another for another button and the theme skin for others.
Cheers
Look at the names property, this is how the theme "knows" what initializer function to call