MCPcopy Create free account
hub / github.com/bajrangCoder/setu / method_color

Function method_color

src/theme/gpui_theme.rs:217–230  ·  view source on GitHub ↗

Get HTTP method color

(method: &crate::entities::HttpMethod, _cx: &App)

Source from the content-addressed store, hash-verified

215 highlight_theme.style.editor_active_line = Some(colors.bg_elevated);
216 highlight_theme.style.editor_line_number = Some(colors.text_muted);
217 highlight_theme.style.editor_active_line_number = Some(colors.accent);
218}
219
220/// Get HTTP method color
221pub fn method_color(method: &crate::entities::HttpMethod, _cx: &App) -> Hsla {
222 use crate::entities::HttpMethod;
223
224 let colors = SetuColors::teal();
225 match method {
226 HttpMethod::Get => colors.method_get,
227 HttpMethod::Post => colors.method_post,
228 HttpMethod::Put => colors.method_put,
229 HttpMethod::Delete => colors.method_delete,
230 HttpMethod::Patch => colors.method_patch,
231 HttpMethod::Head => colors.method_head,
232 HttpMethod::Options => colors.method_options,
233 }

Callers 4

renderMethod · 0.85
newMethod · 0.85
renderMethod · 0.85
render_request_rowMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected