How do I get the default color of Button text? - swift

I am designing a UI in SwiftUI. There are a few buttons that I have customised with a rounded rectangle. I want the color of that rectangle to be the same as the color of the text - blue by default, and light grey in disabled mode.
At present I am hardcoding the colors. Is there some variable or function available to match the system settings for either of those colors?

The default color of a button is .accentColor. This works for both light & dark mode too:
Color.accentColor
I can't seem to find out how to get the disabled button color yet, but I'll update this if I find 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.

What is the color theme used in the VS Code February 2018 release note screenshot

I have been searching for the VS code color theme as shown in the GIF below with no luck. Can anyone help me?
This release came out with few removal of old colors and some new changes have been added which you can check here
The border color of editor highlights can now also be freely chosen:
editor.selectionHighlightBorder: Border color for regions with the same content as the selection.
editor.wordHighlightBorder: Border color of a symbol during read-access, for example when reading a variable.
editor.wordHighlightStrongBorder: Border color of a symbol during write-access, for example when writing to a variable.
editor.findMatchBorder: Border color of the current search match.
editor.findMatchHighlightBorder: Border color of the other search matches.
editor.findRangeHighlightBorder: Border color the range limiting the search (Enable 'Find in Selection' in the find widget).
editor.rangeHighlightBorder: Background color of the border around highlighted ranges.

Adobe Acrobat Pro DC form textfield background gray color not going away

I have a form field text-field and I have set its fill color to no color, but it still shows background gray-ish color in the preview and also after saving the file. I want transparent/white background for the textfield so that reading the text in it can be easy.
Thanks in advance.
Go to Edit-Preferences-Forms and deselect "show border hover color for fields".

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.

Facebook Like Button - change font color?

Is it possible to change the color of text in a Facebook like button? Besides selecting a different color scheme, I don't see a way to adjust the font...
Facebook retains control over their button and only allows you to set predefined options for skinning it. As font color goes, you can choose the light colorscheme to go with light backgrounds, or the dark colorscheme to go with dark backgrounds.
http://developers.facebook.com/docs/reference/plugins/like-box/
YES
It can be done
NO
It's probably not allowed by Facebook's brand guidelines.
Demonstration
I created a demo page that lets you pick the colors using a slider or palette, or that lets you manipulate the filter directly.
Background information
The technique basically works by applying a hue-rotate filter to the element containing the i-frame. Hue-rotate sort-of rotates a color wheel. As such we can't give the button any color we want. We are limited to the 360 degrees of rotation we can apply to the default button. But there are some greens, browns, reds, pink and even purple we can play with. Try it out for yourself.
References
StackOverflow: how to change color of facebook like button
Stijn de Witt's Blog: Change the facebook button color
Include data-colorscheme="light/dark" according to your background in the div with class "fb-like". Light color scheme is for light background and vice-versa.
Facebook has not released this feature yet. However, you may change it using javascript - when using the JS based version, not iframe.