Can I set the color of marks in pMOS and nMOS #131
-
|
We can modify the default wire color using: #zap.circuit({
import zap: *
set-style(zap: (
stroke: ... // like `red + 0.6pt`
))
})and that's wonderful for those components who doesn't have marks. For components like pMOS and nMOS, is there any way to set the color of marks in them? After reading the source code of MOSFETs, I suppose that the mark is drawn with black color by default. if bulk != none {
wire((-height, 0), (rel: (height, 0)))
mark(((-height, 0), 50%, (rel: (height, 0))), (-height, 0), symbol: if (channel == "n") { ">" } else { "<" }, fill: black, anchor: "center")
wire("gl", (rel: (0, -width)), (rel: (-height / 4, 0)))
anchor("g", ())
} else {
wire("gl", (rel: (0, -width / 2)), (rel: (0, -width / 2)))
wire((rel: (0, width / 2)), (rel: (-height / 2, 0)))
anchor("g", ())
mark(
(
-height / 2,
if (channel == "n") { -width / 2 } else { width / 2 },
),
(rel: (height, 0)),
symbol: if (channel == "n") { ">" } else { "<" },
fill: black,
anchor: "center",
)
}between line 55 and line 75, the Is my suppose correct and if right is there any way to set the color of marks?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @AshGreyG 👋, Thank's for the question. Hope this answers your question. |
Beta Was this translation helpful? Give feedback.

Hi @AshGreyG 👋,
Thank's for the question.
In the current version, the marks have a
fill: blackattribute which is preventing you from setting the color yourself. This behavior will be fixed in the upcoming release0.5.0thanks to the amazing work in #119, which overhauls the styling mechanism.Hope this answers your question.