  A triangle in a hypergraph $\mathcal{H}$ is a set of three distinct edges $e,
f, g\in\mathcal{H}$ and three distinct vertices $u, v, w\in V(\mathcal{H})$
such that $\{u, v\}\subseteq e$, $\{v, w\}\subseteq f$, $\{w, u\}\subseteq g$
and $\{u, v, w\}\cap e\cap f\cap g=\emptyset$. Johansson proved in 1996 that
$\chi(G)=\mathcal{O}(\Delta/\log\Delta)$ for any triangle-free graph $G$ with
maximum degree $\Delta$. Cooper and Mubayi later generalized the Johansson's
theorem to all rank $3$ hypergraphs. In this paper we provide a common
generalization of both these results for all hypergraphs, showing that if
$\mathcal{H}$ is a rank $k$, triangle-free hypergraph, then the list chromatic
number \[ \chi_{\ell}(\mathcal{H})\leq \mathcal{O}\left(\max_{2\leq \ell \leq
k} \left\{\left( \frac{\Delta_{\ell}}{\log \Delta_{\ell}}
\right)^{\frac{1}{\ell-1}} \right\}\right), \] where $\Delta_{\ell}$ is the
maximum $\ell$-degree of $\mathcal{H}$. The result is sharp apart from the
constant. Moreover, our result implies, generalizes and improves several
earlier results on the chromatic number and also independence number of
hypergraphs, while its proof is based on a different approach than prior works
in hypergraphs (and therefore provides alternative proofs to them). In
particular, as an application, we establish a bound on chromatic number of
sparse hypergraphs in which each vertex is contained in few triangles, and thus
extend results of Alon, Krivelevich and Sudakov, and Cooper and Mubayi from
hypergraphs of rank 2 and 3, respectively, to all hypergraphs.
