Flutter: Neumorphism Button for Dark UI - flutter

I am trying to make a neumorphic buttons like these:
Any ideas how to achieve this style?
Colors in the Image:
/// background color of the app
Color bgColor = Color(0xFF161616);
/// NueMorphism
Color neuDark = Color(0xFF101010);
Color newLight = Color(0xFF222222);

There is a package for this purpose:
Please see flutter_neumorphic in pub.div
https://pub.dev/packages/flutter_neumorphic

Related

Change Customized horizontal stepper's font color

result
I'd want to add a customised horizontal stepper, but the text colour is too near to the background colour; how can I modify the font color?
https://mui.com/material-ui/react-stepper/#customized-horizontal-stepper
You can change the color with sx prop:
<Stepper
...
sx={{ "& .MuiSvgIcon-root": { color: "red" } }} //or any color
>

How do I test a Material UI Button's background color with Testing Library?

Material UI's Button component renders a relatively straightforward button element with a background color which we can see in a web inspector.
But when we examine this with getComputedStyle in a testing-library/react render, the reported color is 'transparent'.
Is there a way to test the button's background color?
For example, if a component returns:
<Button data-testid="blah" variant="contained" color="primary">
hi
</Button>
It creates a blue button (#3f51b5) with the default theme. But this test:
it("renders with the correct background color", () => {
const { getAllByTestId } = render(<App />);
const button = getAllByTestId("blah")[0];
const buttonStyle = window.getComputedStyle(button);
const backgroundColor = buttonStyle["background-color"];
expect(backgroundColor).toEqual("#3f51b5");
});
Fails with
Expected: "#3f51b5"
Received: "transparent"
Codesandbox link
Got an answer to this on GitHub, but long story short, this is a consequence of how JSDOM works. The "solution" is to test this with something like Cypress, not Testing Library. ¯\_(ツ)_/¯

How do I change the color and width of material drawer component in angular-dart in css?

My first question ever - so apologies if I am not specific enough.
How do I change the color and width of material drawer component in angular-dart in css? I have tried it several ways in the CSS, including as below:
::ng-deep material-drawer {
color: #9437FF;
width: 200px;
}
.material-drawer {
color: #9437FF;
width: 200px;
}
FYI, the following worked with the material-header, which is inside a header tag:
::ng-deep header.material-header.material-header {
background-color: white;
color: #9437FF;
}
My material-drawer is not in a div or anything, just directly an HTML element on its own.
Any pointers are appreciated!
Setting the width of the drawer is a bit complicated. It involves setting a good amount of values as such it is best to use the mixin. You can see an example here
As for the color that is a little bit harder. What color are you trying to change? The background color?
For the background color you can set the background-color on the drawer. The problem is going to be that the content itself is going to override that color. In this case the material-list has it's own white color associated with it. Removing that color you could have problems with the divider colors.

Codename one set remove Accordion border

I am working on a codename one application. I need to remove the border for Accordion component. (or) Is there anyway to change the Accordion's border color..
Can someone guide me...
The black border shown in the image
In your theme.res, just add a UIID with no border and set this UIID for accordeon.Otherwise , you can override accordeon UIID and set empty border like this :
And then uncheck derive and select border "empty"
To remove(hide) the border of an accordion from the code you can define it's border colour to be the same as the background colour and to be as narrow as possible.
Border border = Border.createCompoundBorder(Border.createLineBorder(1, 0xffffff), Border.createLineBorder(1, 0xffffff), Border.createLineBorder(1, 0xffffff), Border.createLineBorder(1, 0xffffff));
my_accordion = new Accordion(ifont_keyboard_right, ifont_keyboard_down);
my_accordion.getAllStyles().setBgColor(0xffffff);
my_accordion.getAllStyles().setBgTransparency(255);
my_accordion.getAllStyles().setPadding(0, 0, 0, 0);
my_accordion.getAllStyles().setMargin(0, 0, 0, 0);
my_accordion.getAllStyles().setBorder(border);

Zend captcha image and color

I'd like to know how to customize colors for captcha image with zend_captcha_image.
The one I could make it work is like this
$this->captcha = new Zend_Captcha_Image();
$this->captcha->setWordLen('4')
->setHeight('60')
->setFont("font.ttf");
it comes with black text and white background, what if I want to use different colors for font in captcha image.
The colours appear to be hard-coded into the _generateImage() method of the Zend_Captcha_Image class, so can't easily be changed. You would need to extend this class and override that method to use your own colours. Specifically these two lines:
$text_color = imagecolorallocate($img, 0, 0, 0);
$bg_color = imagecolorallocate($img, 255, 255, 255);